Jump to content

Referencing a file name with an attribute


Recommended Posts

Is there some kind of simple code I can use as a default attribute value that will display the name of the file?

 

The article below describes a modification to the attribute itself. I need to avoid using such a method.

https://forums.autodesk.com/t5/autocad-electrical-forum/attribute-to-reference-drawing-file-name/td-p/5211633

Link to comment
Share on other sites

I'm not following what you want. How much of the file name do you want? Can you post an example?

 

AFAIK a FIELD is the only way, not sure if that link shows the best method, what's actually wrong with using that method? Not much that's simpler than DIESEL for this that I can think of.

 

The following DIESEL Expression will post the drawing name without .dwg on the end. But really no different than using FILENAME in the linked thread except removes the .dwg.

 

$(substr,$(getvar,"dwgname"),1,$(-,$(strlen,$(getvar,"dwgname")),4))

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...