CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 3535
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 11160:

Question CAD 
 %  platform  category 
Q - question

Dynamic display of layer/block/text style/linetype properties.

A - answer The text field functionality in AutoCAD allows displaying dynamic properties - not only for drawing objects but also for named objects (internal DWG tables). Through this undocumented process you can display current properties of selected layers, text syles, linetypes, blocks, dimension styles, views and tables styles.

Use the standard dialog of the FIELD command or insert a field in your MText editor. Choose the category Objects > Named object. In the pane "Named object type", select the object type - e.g. Layer - and pick a specific object in the name list. In the bottom pane "Field expression", copy (Ctrl+C) the text between the "%" characters (including them). Cancel the dialog.

Edit the copied string (e.g. in Notepad) so that replace the trailing ".Name" with the name of the requested property - e.g. ".Color", ".Height" or ".FontFile".

Now paste this edited complete control string AcObjProp Object back again - as a plain string - into the MText editor or as a new DText - it will be replaced by the detected current value of the particular property. If you then change the property, the text will automatically reflect the change. You can also use more advanced processing using the fields with Diesel expressions.

A sample of such DWG file can be found in the Block Catalog - ObjFields.
100% *  CAD 
3.11.2016    5849×  
Prices - CAD eShop:
applies to: AutoCAD · AutoCAD LT ·

See also:
Tip 13292:Automatic label - number of blocks in the specified area of a DWG.
Tip 13006:Calculated property descriptions (tobogan slide from floor to floor)
Tip 13000:Labels of dimensional parameter values in dynamic blocks (parameters->attributes)
Tip 12790:Centered dynamic label (e.g. area label).
Tip 12685:ReLinkField - re-link fields to source objects.

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension More info

Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.