11-28-2014 08:21 AM
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
11-28-2014 08:26 AM
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,
11-28-2014 08:30 AM
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.
12-04-2014 05:39 AM
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
12-04-2014 06:43 AM
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
12-04-2014 07:06 AM
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