Accessing Custom Property Instance value from VBScript

I searched the forums and the manual but didn't quite see what I was looking for.


I have a valve class, and a valve instance of that class called DO01.

I deployed a project symbol for the valve instance, and tied my custom property [#TagName:] to the instance DO01->Name so that the valve does what it is supposed to.

When I click on the valve, I use VBScript to open a new screen for a faceplate that can be used to turn that valve on or off.

Here is the problem: For my VBScript to work, I have to hardcode the instance name not only in the custom property (which is fine), but I also have to hardcode the instance name within the VBScript itself (see below).

$DO_pointer = "DO01"
$Open("as_DO_faceplate",1, -1, -1, -1, 0, 10, "")


What I want to do, is to access the #TagName: custom property which I already configured at the instance level from VBScript so that I don't have to hardcode the instance name twice.

It seems like this must be possible, but I cant get it to work and could use some help.

Best regards,

Joel

  • It looks like it is not possible to read a custom property instance value from VBScript.

    The example Indirect.app worked around this by hardcoding the valve name in both places - the custom property and also the VBscript.

    This is essentially the same as what I had done. It isn't optimal, but it works with extra configuration.