PrimalSense Not AutoCompleting Parameters

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
kellydavies
Posts: 4
Last visit: Fri Aug 04, 2017 1:26 pm

PrimalSense Not AutoCompleting Parameters

Post by kellydavies »

Product, version and build: PowerShell Studio 2017 (5.4.143) 64-bit
Operating system: Windows 7 Enterprise Edition (64-bit) or Windows 10 Enterprise Edition (64-bit)

The autocomplete feature in the PowerShell Studio script editor does not appear to be working for parameters with ValidateSet validation rules. The issue occurs whether for custom functions that use the ValidateSet rule or for built-in PowerShell cmdlets.

For example, the -Expand parameter in Format-Table has only three enumerated options: Both, CoreOnly, EnumOnly. When adding the command to a script in PowerShell Studio, the tab autocomplete feature will add the -Expand parameter to the code line but will not display the set of available options. On the other hand, when editing the script in PowerShell ISE, using the -Expand parameter with Format-Table will cause the list of available options to appear.

The other PrimalSense features such as colour coding of commands and parameter names, the TAB to add all available parameters, etc. all seem to work.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: PrimalSense Not AutoCompleting Parameters

Post by davidc »

I'm able to get PrimalSense for the Validation set when it comes to custom function declared in the script. As for core cmdlets, the cached information doesn't include that validation set information, but this is something we hope to address in the future.
David
SAPIEN Technologies, Inc.
User avatar
kellydavies
Posts: 4
Last visit: Fri Aug 04, 2017 1:26 pm

Re: PrimalSense Not AutoCompleting Parameters

Post by kellydavies »

Ok, I dug a little further regarding the custom functions.

You are correct that it works with custom functions in a .PS1 file, but as soon as the .PS1 file is converted to a module, PowerShell Studio will no longer complete the parameter values while the PowerShell ISE will continue to successfully autocomplete.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: PrimalSense Not AutoCompleting Parameters

Post by davidc »

Yes, this is because modules are cache by the application and that information is not retained.
David
SAPIEN Technologies, Inc.
User avatar
kellydavies
Posts: 4
Last visit: Fri Aug 04, 2017 1:26 pm

Re: PrimalSense Not AutoCompleting Parameters

Post by kellydavies »

Ah, makes sense. Disappointing, but makes sense.

Thanks.
This topic is 6 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.