CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 17416

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.
ACADLT
100% *  CAD 
3.11.2016    10996×  
Prices - CAD eShop:
applies to: AutoCAD · AutoCAD LT ·

See also:
Tip 14039:How to display the total volume or surface of 3D solids in DWG?
Tip 13760:Parametric text content in Fusion 360 sketches (and models).
Tip 13740:Dynamic label with filesize of the current DWG file.
Tip 13737:Formatting leading zeros in AutoCAD fields (and automatic field update).
Tip 13712:Why do I have an inactive "thousands separator" item in AutoCAD text field formatting?


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   



Featuring:
Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools 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.
TOPlist