AcDbPropertiesOverrule sample

AcDbPropertiesOverrule sample

lpr8PZGA
Enthusiast Enthusiast
267 Views
1 Reply
Message 1 of 2

AcDbPropertiesOverrule sample

lpr8PZGA
Enthusiast
Enthusiast

Hello,

 

I need to show a custom property of an entity in the Properties Bar, allow the user to change the property and to alter the entity on its custom property change.
Let's have this for example:

 

  • A TEXT entity contains a string, e.g. "123abc".
  • My property name be "MyNumber".
  • So when I pick the text, in the property bar the (new) row "MyNumber" should appear with the value 123.. (This field is to ignore all but a valid number.)
  • Then I overwrite the value in the Properties Bar from 123 to e.g. 789.
  • The the TEXT entity content should change to "789" as a reaction to the hereabove.

I guess that AcDbPropertiesOverrule should be used for this but I cannot make a working sample.
Any hints how to do it?

 

TIA.

 

Best regards,

 

Lukas

 

0 Likes
268 Views
1 Reply
Reply (1)
Message 2 of 2

daniel_cadext
Advisor
Advisor

Autodesk should at least provide more documentation regarding this. My guess is that you need to create a COM wrapper

You might have better luck with the simpledynprops sample

https://www.theswamp.org/index.php?topic=59518.0

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes