Dot Notation Bug in Powershell Stutio 2012

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 11 years and 7 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
amandhally
Posts: 10
Last visit: Thu Oct 08, 2020 9:59 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally »

Hi, I am using PowerShell studio 2012 Version 3.0.7There is bug in using Dot Notation in primal studio. When we save any thing is variable in PowerShell studio and when we use Dot notation with that variable it never shows the corresponding Properties and methodsthis is the error and ideally it should work like this { below screenshot is from from my another vendors Powershell editor}This same thing happen with .NET Objects .thanksaman dhally
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Dot Notation Bug in Powershell Stutio 2012

Post by davidc »



This
isn't a bug, but a byproduct of the way PowerShell Studio handles variables.

PowerShell
Studio tries to determine the variable state without running the script. Every
time you run a script in PowerShell Studio, it creates a new runspace, thus
variables states are not retained.



It
David
SAPIEN Technologies, Inc.
User avatar
amandhally
Posts: 10
Last visit: Thu Oct 08, 2020 9:59 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally »

HI David,Thanks for the reply...So what is the best way to do this? after all we need to know what is stored in a variable.. {string}thanksaman
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Dot Notation Bug in Powershell Stutio 2012

Post by davidc »

You have
the option to run the scripts in the console and then interrogate the variable
to determine what it contains. $var.GetType() If you know what the type is you can cast the variable in the editor to get PrimalSense support:[string]$var = ... David
David
SAPIEN Technologies, Inc.
User avatar
amandhally
Posts: 10
Last visit: Thu Oct 08, 2020 9:59 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally »

hummm....okies... if that is the only way :) thanks for the support david.aman
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Dot Notation Bug in Powershell Stutio 2012

Post by davidc »

Like I said, we are looking into a hybrid system so you need not worry about this. David
David
SAPIEN Technologies, Inc.
User avatar
amandhally
Posts: 10
Last visit: Thu Oct 08, 2020 9:59 pm

Dot Notation Bug in Powershell Stutio 2012

Post by amandhally »

thanks David :)
This topic is 11 years and 7 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.