Valued Contributor
Posts: 63
Registered: ‎06-22-2010
Message 1 of 1 (292 Views)

Custom AutoCAD Fields (Insert - Field...) - How?

292 Views, 0 Replies
02-16-2012 01:22 AM

We have a requirement to make a few project details available as standard AutoCAD fields (plain text fields, if that makes a difference), and have them re-evaluated on, for example, a regen. Although I'm aware of AcDbField and AcFdFieldEvaluator and have tried to create things correctly, I never see anything I recognise as mine in the Insert - Fields... dialog. The [ObjectARX] help files only detail the classes and don't give details of how the whole field system works, and the sample given with ObjectARX is very unhelpful - it creates a bunch of objects and doesn't really explain what's going on. If you load the resulting DBX from that compiled sample, although the registry entries get set as expected, nothing works - neither TEXTFILEFIELD nor TNF are recognised as commands and nothing appears in the Insert - Field... dialog.


Do I need evaluators and evaluator loaders? It seems a huge amount of overkill for a simple field. I don't understand why you don't just derive from AcDbField and have that override a virtual function the system can call to get the updated value.


Assuming I need all of this stuff - including registry entries - can anyone outline the steps I need to take to get my field listed under Insert - Field... and to call into my code to get an updated value on regen?




Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.