I'm trying to write a script that creates a picture constant. I can do that by using the "Move" method to make a copy of an existing picture constant. But the "Move" method doesn't give a reference to the newly created picture constant, so I have to write code to hunt for it. Is there a cleaner way to do this?
Solved! Go to Solution.
Here's how I would do it:
1. Have a stub subVI that contains a picture constant.
2. Use scripting to drop that subVI on the target diagram.
3. Call the 'Inline' method of the subVI class on that new subVI, and wire TRUE to the 'wrap in sequence' parameter.
4. The method returns a reference to the sequence that was created. Call Traverse for GObjects.vi with a traverse target of 'Other', and wire the Sequence reference as the Other reference, and traverse for constant. The resulting reference is the new picture constant.
5. Call Remove Structure on the created sequence.
Create a control, get the ControlTerminal reference and change it to a constant.