I have some 'Forms Projects Script' that are working correctly with Studio 2012 V 3.11 if i specifies that i use MS-PS V2
When i specifies that i use MS-PS V3, it seems that some globals variables ( created in global.ps1) are no more global.
Ok, i thinking : it is very strange but it may be it a consequence the change to MS-PS V3.
But When i make the upgrade from studio 2012 version V 3.11 to versions (3.12 - 3.14), i got the same problem whatever way i use MS-PS V2 or V3.
I don't undertand what's going on there.
Have Some Explanation ?
Best Regards
Eric
Strange modification of comportment between Studio v3.11 and upper versions With Powshell v 3.0
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.
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.
- eric.morsa@isl.be
- Posts: 9
- Last visit: Fri Jul 23, 2021 2:41 am
Strange modification of comportment between Studio v3.11 and upper versions With Powshell v 3.0
When you say 'no longer global' do you mean when you run the script or the PrimalSense is not displaying the variables?
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- eric.morsa@isl.be
- Posts: 9
- Last visit: Fri Jul 23, 2021 2:41 am
Strange modification of comportment between Studio v3.11 and upper versions With Powshell v 3.0
I got an error message.
It is like the variable was recreated with an empty value.
Eric
ERROR: Propriété « Tables » introuvable dans cet objet. Assurez-vous qu’elle existe.
ERROR: + CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
ERROR: + FullyQualifiedErrorId : PropertyNotFoundStrict
It is like the variable was recreated with an empty value.
Eric
ERROR: Propriété « Tables » introuvable dans cet objet. Assurez-vous qu’elle existe.
ERROR: + CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
ERROR: + FullyQualifiedErrorId : PropertyNotFoundStrict
Strange modification of comportment between Studio v3.11 and upper versions With Powshell v 3.0
Please zip and email your project to support@sapien.com and we will see if we can recreate the problem.
Just in case, make sure you are running the Project (Ctrl + F4) and not the single file (Ctrl + F5).
David
Just in case, make sure you are running the Project (Ctrl + F4) and not the single file (Ctrl + F5).
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- eric.morsa@isl.be
- Posts: 9
- Last visit: Fri Jul 23, 2021 2:41 am
Strange modification of comportment between Studio v3.11 and upper versions With Powshell v 3.0
Thanks for your Help.
I attach a file with a sample of code.
I use a personnal function that open a database (centralized functions).
The function is created in "Global.ps1".
I used this function in "startup.psf".
I load a Combobox in "OnLoadFormEvent" in the "MainForm.pff".
In "button1_Click", i use the data of the combobox.
This code runs rigth in Studio 2012 V3.11 with MS-PS V2.
It gives a error in Studio 2012 V3.11 when i used with MS-PS V3.
It gives a error with Sudio 2012 V(3.12-3.14) with MS-PS V2 and MS-PS V3.
Best regards.
Attached files /FileUpload/13/d1e23c2865e286d0149a0799e25318.rar (4.9 KB)
I attach a file with a sample of code.
I use a personnal function that open a database (centralized functions).
The function is created in "Global.ps1".
I used this function in "startup.psf".
I load a Combobox in "OnLoadFormEvent" in the "MainForm.pff".
In "button1_Click", i use the data of the combobox.
This code runs rigth in Studio 2012 V3.11 with MS-PS V2.
It gives a error in Studio 2012 V3.11 when i used with MS-PS V3.
It gives a error with Sudio 2012 V(3.12-3.14) with MS-PS V2 and MS-PS V3.
Best regards.
Attached files /FileUpload/13/d1e23c2865e286d0149a0799e25318.rar (4.9 KB)
Strange modification of comportment between Studio v3.11 and upper versions With Powshell v 3.0
This is caused by PowerShell's scoping rules.
Try using the script scope otherwise the ObjConnectionReader may not be accessable in events:
$script:ObjConnectionReader = Sgbd_OpenConnectionToIdm
David
Try using the script scope otherwise the ObjConnectionReader may not be accessable in events:
$script:ObjConnectionReader = Sgbd_OpenConnectionToIdm
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.