VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SystemDefinition: NullReferenceException when creating an Alias

Hello,

 

I'm programatically creating a SystemDefinition and I have the problem that I cannot create an Instance of the "Alias" class when using the (String, String, String) overload. No matter what texts I pass as arguments, I always get a NullReferenceException saying "Object reference not set to an instance of an object". 

 

What's wrong?

 

Thanks

 

 

0 Kudos
Message 1 of 6
(5,271 Views)

Hi,

 

To get an efficient help, I suggest you to identify your VeriStand and other tools versions and maybe to post an extract of your code

 

Bes regards,

0 Kudos
Message 2 of 6
(5,268 Views)

My VeriStand Version is 2012 and I'm using IronPython to create the system definition.

 

Example code:

Alias('Alias1', '', 'Targets/Controller/Hardware/Chassis/DAQ/PXI1Slot5/Digital Output/port0/NIP0_36')

 

I don't think this has anything to do with IronPython since I get the same error when using LabView.

 

0 Kudos
Message 3 of 6
(5,265 Views)

Hi,

basically LabVIEW and other text based programming languages are always referencing to the .NET API of VeriStand.

Please check the following link, they create an Alias for a custom device

 

create an alias from a custom devichttp://forums.ni.com/t5/NI-VeriStand/create-an-alias-from-a-custom-device-page/td-p/2590999e page - Discussion Forums
http://forums.ni.com/t5/NI-VeriStand/create-an-alias-from-a-custom-device-page/td-p/2590999

 

Here is also another example basedLabVIEW Walkthrough: Modifying Models in a System Definition File on LabVIEW

 

Are you able to create the Alias in LabVIEW? If so, please use the same .NET calls in Iron Python

 

Kind regards,

 

RupiDo

 

NIG, Munich

 

0 Kudos
Message 4 of 6
(5,207 Views)

Hello RupiDo,

 

when I opened this thread I was already convinced that this is just another Bug in VeriStand. I just wanted you guys to confirm it. In your second link Jarrod S. confirmed that it is a bug (I didn't find that answer although I searched the forum before posting).

 

Why isn't this bug listed in the known issues list for VeriStand 2012? I have wasted so many hours trying to fix things that in the end turn out to be known bugs in VeriStand. Frustrating.

 

I was able to workaround the bug using the FindNodeByPath method.

 

Regards

Krid

 

 

0 Kudos
Message 5 of 6
(5,201 Views)

Hi Krid,

 

I just double checked the known Issues in VS 2012. I agree it's a hassle that the creating Alias instance bug isn't listed. Pardon, for this fact.

Generally I will forward the concerns about documentation to the internal group, who are in charge of the docu.

 

Thanks for your patience.

 

Kind regards,

RupiDo

 

0 Kudos
Message 6 of 6
(5,196 Views)