CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
Cesky English Deutsch
 Visitors: 2148 

CAD tip CAD tip # 7003:

Question CAD 
 %  platform  category 
Q - question

Modified drawing name as an automatic field.

A - answer If you want to insert a text in your drawing (e.g. to the title block) which contains a manipulated name of the current drawing file - e.g. the filename left-trimmed or right-trimmed at a number of characters, you can use a combination of Diesel expressions in an automatic text field (e.g. with the FIELD command).

Some examples:

Drawing file name, no path, from the 3rd character (paste as a Diesel expression to a Diesel-type field):

Drawing file name, no path, no extension (4 characters), right-trimmed at another 3 characters (paste as a Diesel expression to a Diesel-type field):
Beginning of the drawing path (12 characters), ellipsis, first 8 characters of the drawing file name (paste as a Diesel expression to a Diesel-type field):
Path without the disk letter and the drawing file name, all converted to uppercase (paste as a Diesel expression to a Diesel-type field):
100% *  CAD 
19.10.2009    25390×  

See also:
Tip 12685:ReLinkField - re-link fields to source objects.
Tip 12616:Att2elev - move block to elevation specified by its attribute.
Tip 12470:A table with calculated expressions is suddenly dead, doesn't calculate and update.
Tip 11888:Dynamic label of area and perimeter - DynArea.
Tip 11794:Undocumented code in field expression - MText contents without control characters.

Back   All CAD Tips All CAD tips&tricks

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   

Link your AutoCAD texts with Excel tables/sheets. Export. Change. Import.
Try DwgText 2020 More info

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