Jump to content
CafeJr

Get part of dwg file name and write it on a inside attribute block.

Recommended Posts

CafeJr

:unsure:

 

Hello Guys,

 

I have a doubt, someone knows if has some Lisp to get the last digits (specified - user input) of a dwg file name (in Windows explorer) and write it on a specific attribute name on a internal block.

 

Eg.: I have a folder with 600 pages dwg files, so, the last numbers of it is a specific item to show the page number of that file, it's possible read these numbers and write in an attribute inside dwg to correct the page index.

Share this post


Link to post
Share on other sites
dbroada

I was going to say that SLW210 helped me with this a little while back and I'll look for the thread but I don't need to as he has already posted the link.

Share this post


Link to post
Share on other sites
CafeJr
I was going to say that SLW210 helped me with this a little while back and I'll look for the thread but I don't need to as he has already posted the link.

 

dbroada - Do you have a Lisp that can help with it?...

Share this post


Link to post
Share on other sites
dbroada

No LISP required - just use a FIELD for your default attribute value. When you set up the field one of the options is to add a diesel expression.

 

I can't help you more than that as I am off work atm and don't have access to AutoCAD.

Share this post


Link to post
Share on other sites
CafeJr

I think that I got it!... I'll try!!!... Thank you!!!...

Share this post


Link to post
Share on other sites
CafeJr

dbroada,

 

 

I got it, the idea, but I can't found the location to write the specific function to put it in a Field of attribute. Can you write it? What type of attribute could be used to do it?...

 

 

Thanks again!...

Share this post


Link to post
Share on other sites
SLW210

Right Click in the Attribute Editor Value box and select Insert Field.

Field Category = Other > Field Names = Diesel Expression > Diesel Expression goes in area to the right labeled Diesel Expression.

Diesel Expression Field.jpg

Share this post


Link to post
Share on other sites
CafeJr
Right Click in the Attribute Editor Value box and select Insert Field.

Field Category = Other > Field Names = Diesel Expression > Diesel Expression goes in area to the right labeled Diesel Expression.

 

 

Thank you a lot SLW210 and dbroada, to your answers!... It works as good as I need!!!...

Share this post


Link to post
Share on other sites
SLW210

Glad you have it sorted! :thumbsup:

 

De Nada! You are welcome!

Share this post


Link to post
Share on other sites
CafeJr
Glad you have it sorted! :thumbsup:

 

De Nada! You are welcome!

 

Nice portuguese!... SLW210!... He he he...

Share this post


Link to post
Share on other sites
Organic
I was going to say that SLW210 helped me with this a little while back and I'll look for the thread but I don't need to as he has already posted the link.

 

Likewise. It is very hand and I use it in our template now.

Share this post


Link to post
Share on other sites
CafeJr
Right Click in the Attribute Editor Value box and select Insert Field.

Field Category = Other > Field Names = Diesel Expression > Diesel Expression goes in area to the right labeled Diesel Expression.

 

Hi SLW210, Using this Diesel expession I have made a small alteration that works as good the first:

$(substr,$(getvar,"dwgname"),42,2)

 

**"xx" it's the length where the text will be cutted, and the number two (2) is how many letters do you need.

 

Thank you!...

Edited by CafeJr

Share this post


Link to post
Share on other sites
CafeJr
You can do a lot with Diesel. SEE THIS!

 

;) Thanks...

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...