Ad

Sunday, August 28, 2022

AutoCAD Fields: Layout Name Conversion

 One can use Diesel expressions to convert data in AutoCAD. In this case, I want to convert the layout tab name to a fuller name. So if I have CIV I want the field to show "Civil" and if the layout tab name is "INF" it should be "Infrastructure". 

$(if,$(eq,$(getvar, "ctab"),"CIV"),"Civil",$(if,$(eq,$(getvar, "ctab"),"INF"),"Infrastructure","Error"))

The help topic for Diesel expressions may be found here: 

https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-LT/files/GUID-F94A885A-4DA2-432B-AC1A-EB49CC6C1C72-htm.html 

Note that the link will probably die in 3 to 4 years. 

Here is a video showing it in action: https://youtu.be/zUpX04RfnNA 

No comments:

LinkWithin

Blog Widget by LinkWithin

Ad