Limited PrimalSense.

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.
User avatar
alexayr
Posts: 16
Joined: Sun Mar 03, 2013 12:42 pm

Limited PrimalSense.

Post by alexayr »

Product, version and build: PrimalScript Version 7.3.102
32 or 64 bit version of product: 64 bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit

After having launched the Powershell Cache Editor to import a module containing a library of custom Commandlets PSPrimalSense provides tool tips but, stops providing code completion after having selected any of the modules custom Commandlets. I'm able to view the custom Commandlets by expanding the imported module in the Powershell/64 Bit/Modules folder in the Object browser. However, selecting the help context menu option yields no results in the Sapien Document Explorer (where it appears the module failed the import process). PSPrimalSense behaves expected with standard Posh v5 Commandlets. What steps are necessary to force PSPrimalSence to provide code completion for all custom Commandlets from imported Modules?

Best Regards,

Yves

User avatar
Alexander Riedel
Posts: 7467
Joined: Tue May 29, 2007 4:43 pm

Re: Limited PrimalSense.

Post by Alexander Riedel »

It is not quite clear from your description if you do not see PrimalSense for your module's cmdlest or if you do not see help. Since they are two different things, can you please elaborate?
If you see your modules and their cmdlets in the object browser you should also see them colored and get code completion. Additionally your should also see the parameter tool tips when editing a statement or hovering over a cmdlet. Please indicate if you see this things.
Additionally please indicate if you created a help file for your modules or if you have have the help information embedded in the code.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
alexayr
Posts: 16
Joined: Sun Mar 03, 2013 12:42 pm

Re: Limited PrimalSense.

Post by alexayr »

Alexander Riedel wrote:It is not quite clear from your description if you do not see PrimalSense for your module's cmdlest or if you do not see help. Since they are two different things, can you please elaborate?
If you see your modules and their cmdlets in the object browser you should also see them colored and get code completion. Additionally your should also see the parameter tool tips when editing a statement or hovering over a cmdlet. Please indicate if you see this things.
Additionally please indicate if you created a help file for your modules or if you have have the help information embedded in the code.
As I'd mentioned previously I do see the imported module in the PrimalScript Object Browser. All of the custom cmdlets are exposed when the module is expanded. When I begin typing one of the custom cmdlets the auto complete selection dialog appears. Once the cmdlet is selected it is inserted in the script. The parameter tool tip does appear when the cursor hovers over the cmdlet. However, when I attempt to add parameters the selection dialog that typically displays available parameters for selection does not reappear, hence limited PrimalSense. Secondarily, if I right click on the the custom cmdlet and click help (F1) the Document Explorer is unable to find the cmdlet I'm guessing because the module does not appear in the Document Explorer Content Browser.

The custom module does not contain a help, however, all of the cmdlets that are in the module have standard help comment blocks. I'm told that pictures are worth a 1000 words, so I'd be willing to include screen captures if necessary. Please advise.

Best Regards,

Yves

User avatar
Alexander Riedel
Posts: 7467
Joined: Tue May 29, 2007 4:43 pm

Re: Limited PrimalSense.

Post by Alexander Riedel »

Help content is imported separately in Document Explorer. You will need a standard Powershell help file for import.
As to the parameters not triggering, I do not know. If they are visible in the tooltip they *should* trigger.
Is it possible for you to upload a module so we can examine it? You can upload it here: https://www.sapien.com/support/upload
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
alexayr
Posts: 16
Joined: Sun Mar 03, 2013 12:42 pm

Re: Limited PrimalSense.

Post by alexayr »

Alexander Riedel wrote:Help content is imported separately in Document Explorer. You will need a standard Powershell help file for import.
As to the parameters not triggering, I do not know. If they are visible in the tooltip they *should* trigger.
Is it possible for you to upload a module so we can examine it? You can upload it here: https://www.sapien.com/support/upload
I unfortunately cannot upload the module without infringing on corporate security policy due to the nature of the module.

Best Regards,

Yves

User avatar
Alexander Riedel
Posts: 7467
Joined: Tue May 29, 2007 4:43 pm

Re: Limited PrimalSense.

Post by Alexander Riedel »

Ok, could you take two functions which do not provide primalsense, remove all the code in the body of the function, put that in a PS1 and upload that?
This way we can make a stub module with your functions without seeing any of your actual information.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
alexayr
Posts: 16
Joined: Sun Mar 03, 2013 12:42 pm

Re: Limited PrimalSense.

Post by alexayr »

Alexander Riedel wrote:Ok, could you take two functions which do not provide primalsense, remove all the code in the body of the function, put that in a PS1 and upload that?
This way we can make a stub module with your functions without seeing any of your actual information.
I certainly can and will do that as soon as I'm able to. In the meanwhile I'd like to share some observations with you regarding my module problem that I find to be quite curious. I downloaded the 45 day trial version of PowerShell Studio 2017 (for pre-procurement evaluation) I then created a new module utilizing the "New Module from Functions" feature. I made certain to enable the "Create external help file" option. I then imported the newly created module into PowerShell Studio 2017 and Voilà PowerShell Studio Primal Sense works flawlessly. I also imported the newly created external help file into the Sapien Document explorer and Voilà Cmdlet help is displayed in its full glory. I removed the bad module from Primal Script, Cleared the PSPrimal Sense cache, restarted Primal Script, re-imported the module and Primal Script continues to exhibit the behavior that was originally reported. PS Primal Sense simply does not work beyond the code completion of the Cmdlet. I still see the parameter tool tip when I hover the cursor over the Cmdlet, but no color difference and no parameter code completion. Yet the same module works in PowerShell Studio 2017 without error. Odd enough for you?

Best Regards,

Yves

User avatar
Alexander Riedel
Posts: 7467
Joined: Tue May 29, 2007 4:43 pm

Re: Limited PrimalSense.

Post by Alexander Riedel »

"I still see the parameter tool tip when I hover the cursor over the Cmdlet, but no color difference and no parameter code completion". PowerShell Studio and PrimalScript are two different products, so there are differences, obviously.
I cannot tell what you see from your description really. From what you say, you do not get your module's cmdlets' colored, yet you get a parameter tooltip. You get the parameter tooltip but no parameter popup when hitting the - key.
That is what I understand from your description. I would need to really reproduce that, since it makes no sense that the information is there but not used.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
alexayr
Posts: 16
Joined: Sun Mar 03, 2013 12:42 pm

Re: Limited PrimalSense.

Post by alexayr »

Alexander Riedel wrote:"I still see the parameter tool tip when I hover the cursor over the Cmdlet, but no color difference and no parameter code completion". PowerShell Studio and PrimalScript are two different products, so there are differences, obviously.
I cannot tell what you see from your description really. From what you say, you do not get your module's cmdlets' colored, yet you get a parameter tooltip. You get the parameter tooltip but no parameter popup when hitting the - key.
That is what I understand from your description. I would need to really reproduce that, since it makes no sense that the information is there but not used.
I believe that I may have inadvertently resolved my issue. I'm not 100% certain as to what I did to make the difference, however, tracing my most recent steps I realized that the folder containing the module was placed into a folder a level deeper than it should have been. I cleared the PS PrimalSence cache, removed the module from the cache editor, closed PS, moved the folder containing the module to the "C:\Users\<USERNAME>\Documents\WindowsPowerShell\Modules" folder instead of "C:\Users\<USERNAME>\Documents\WindowsPowerShell\Modules\extraneousfolder" folder, restarted PS, re imported the module in the PS cache editor, and Voilà PrimalScript Primal Sense works as expected. Again, I'm not 100% certain as to what I did to make the difference, but it seems to be working which is all that matters. Thank you for your help.

Best Regards,

Yves.