Module project PrimalSense from RequiredModules

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 5 years and 5 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
claussen
Posts: 19
Last visit: Mon Jan 29, 2024 10:40 am

Module project PrimalSense from RequiredModules

Post by claussen »

Product, version and build: PSS 2018 5.5.154
32 or 64 bit version of product: 64
Operating system: Windows 10 Enterprise
32 or 64 bit OS: 64

I have a module project which has a list of modules in the "RequiredModules" key in the PSD1. However, each function does not recognize the cmdlets/functions from the modules and inserts an "Import-Module" command when I use one.

See the PSD defintion:
2018-09-25_15-22-08-psd.png
2018-09-25_15-22-08-psd.png (13.45 KiB) Viewed 3576 times
And the function I am writing... There is no PrimalSense for the ActiveDirectory module
2018-09-25_15-22-42-function.png
2018-09-25_15-22-42-function.png (22.46 KiB) Viewed 3576 times

Of course, if I use the "Import-Module ActiveDirectory" somewhere in the function file, PrimalSense works properly. Are there any plans for PSS to recognize modules from the PSD and provide PrimalSense project wide?

Thanks!
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Module project PrimalSense from RequiredModules

Post by mxtrinidad »

Is your custom module already visible on the Object Browser before creating the script?
User avatar
claussen
Posts: 19
Last visit: Mon Jan 29, 2024 10:40 am

Re: Module project PrimalSense from RequiredModules

Post by claussen »

ActiveDirectory is not a custom module... But yes, ActiveDirectory is visible in the Object Browser. The module I am building is not exported to the system module path so it does not appear in the OBject Browser. I am trying to use the ActiveDirectory module in my custom module, but PSS does not appear to perform PrimalSense from RequiredModules defined in the project's PSD1 file.
2018-09-25_16-23-17-module.png
2018-09-25_16-23-17-module.png (10.05 KiB) Viewed 3567 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Module project PrimalSense from RequiredModules

Post by davidc »

Hello,

What setting do you have for the following?

Options->PrimalSense->Cmdlet PrimalSense
Options - Cmdlet PrimalSense.png
Options - Cmdlet PrimalSense.png (30.46 KiB) Viewed 3566 times
By setting it to Show and Color All Cmdlets, it will ensure the cmdlets are always colored.
David
SAPIEN Technologies, Inc.
User avatar
claussen
Posts: 19
Last visit: Mon Jan 29, 2024 10:40 am

Re: Module project PrimalSense from RequiredModules

Post by claussen »

That was it! Mine was set to "Show All Cmdlets (PrimalSense only)." Changing to Show all fixed it. Thanks!
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Module project PrimalSense from RequiredModules

Post by mxtrinidad »

Good!! I was referring to your custom ...PS.psd1 module file.
Glad you found the resolution.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Module project PrimalSense from RequiredModules

Post by davidc »

We will look into pulling the module information from the manifest manifest when your PrimalSense setting is set to Active Modules Only.
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Module project PrimalSense from RequiredModules

Post by davidc »

The build with the fix has been released (v5.5.155).
David
SAPIEN Technologies, Inc.
This topic is 5 years and 5 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.