Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help with using Pulsonix
 Scripting
 Can't read NetClass attribute from Net
Author Previous Topic Topic Next Topic  

MK_CZSMT

Germany
4 Posts

Posted - 10 Mar 2022 :  15:18:44  Show Profile
For the purpose of analyzing a design for e.g. statistic information I want to access the NetClass of each net.

I tried to create a minimum working example. I noticed that I couldn't access the NetClass Element of a Net by reading e.g. Net.Class.Name. I then thought, that the NetClass Element might be Null, Empty or any other strange state, when a Net has no class. I wrote several tests to check if it is Null, Empty etc. But even the check for Null fails. In my MWE attached I get the error message:

Objekt erforderlich
Src: Laufzeitfehler in Microsoft VBScript
Line:16 Error:0 Scode:800a01a8


This refers to the line

if (Net.Class() Is Null) then


I don't know why I get this error. It seems that contrary to the explanations for the Objects of type Net there is no property of type NetClass in a Net. What am I doing wrong here?





Download Attachment: NetclassMWE1.txt
1.07 KB

lewism@pulsonix.com

United Kingdom
62 Posts

Posted - 11 Mar 2022 :  09:55:08  Show Profile
Hi MK_CZSMT,

Rather than doing..

if (Net.Class() Is Null) then

Could you try..

if (Net.Class() Is Nothing) then

Then see if it completes the script. If there are any issues or you think there is a bug that is stopping it from working. Please contact support@pulsonix.com and we can help investigate further for you.


Lewis
Go to Top of Page

MK_CZSMT

Germany
4 Posts

Posted - 11 Mar 2022 :  12:27:54  Show Profile
This seems to work. So I can filter out the Nets without Class. They haven't the Class element properly initialized.

VBscript is a strange language :)
Go to Top of Page

lewism@pulsonix.com

United Kingdom
62 Posts

Posted - 11 Mar 2022 :  12:48:59  Show Profile
Glad it got you sorted.

Many thanks.

Lewis
Go to Top of Page
  Previous Topic Topic Next Topic  
Jump To: