In this post I will explain how is possible to create Pseudo attribute, that will be evaluated, from expression you entered into other attribute.
Pseudo attribute allow for dynamic values to be returned as needed rather than having static values stored in the database.
The code required to return a pseudo attribute value must be plugged in through the use of the C# API.
I will create UDA attribute (:uExpTest), where I will enter expression and system will output result to :uResultTest.
I will show you, how this UDA can be printed in Isometric.
- 1. Create word type UDA (:uExpTest) in Lexicon
- 2. Create word type pseudo UDA (:uResultTest) . Here system will output calculated value.
- 3. Modify IsodraftAddins.xml and DesignAddins.xml that’s located in Pdms root folder to include addin ‘UDATestAddin.dll’
- 4. Enter Design and input expression into attribute :uExpTest that need to be calculated
- 5. Modify option file, to mark INST with UDA attribute
We have isometric with UDA, that was calculated based on expression we entered. In my case it evaluated ‘NAME OF PIPE‘ and printed /4″-B-1
This is possible because we wrote Addin created with C#.
You can download example from here.
Now you can learn source C# code from my public GitHub