CafeJr Posted January 15, 2015 Share Posted January 15, 2015 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. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted January 15, 2015 Share Posted January 15, 2015 This can be done using a Field and Diesel Expression. See this thread.......... http://www.cadtutor.net/forum/showthread.php?89259-shortening-fields-in-attributes Quote Link to comment Share on other sites More sharing options...
dbroada Posted January 15, 2015 Share Posted January 15, 2015 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. Quote Link to comment Share on other sites More sharing options...
CafeJr Posted January 16, 2015 Author Share Posted January 16, 2015 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?... Quote Link to comment Share on other sites More sharing options...
dbroada Posted January 16, 2015 Share Posted January 16, 2015 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. Quote Link to comment Share on other sites More sharing options...
CafeJr Posted January 16, 2015 Author Share Posted January 16, 2015 I think that I got it!... I'll try!!!... Thank you!!!... Quote Link to comment Share on other sites More sharing options...
CafeJr Posted January 20, 2015 Author Share Posted January 20, 2015 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!... Quote Link to comment Share on other sites More sharing options...
SLW210 Posted January 20, 2015 Share Posted January 20, 2015 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. Quote Link to comment Share on other sites More sharing options...
CafeJr Posted January 20, 2015 Author Share Posted January 20, 2015 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!!!... Quote Link to comment Share on other sites More sharing options...
SLW210 Posted January 20, 2015 Share Posted January 20, 2015 Glad you have it sorted! De Nada! You are welcome! Quote Link to comment Share on other sites More sharing options...
CafeJr Posted January 20, 2015 Author Share Posted January 20, 2015 Glad you have it sorted! De Nada! You are welcome! Nice portuguese!... SLW210!... He he he... Quote Link to comment Share on other sites More sharing options...
Organic Posted January 24, 2015 Share Posted January 24, 2015 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. Quote Link to comment Share on other sites More sharing options...
CafeJr Posted March 29, 2018 Author Share Posted March 29, 2018 (edited) 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 March 29, 2018 by CafeJr Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 29, 2018 Share Posted March 29, 2018 You can do a lot with Diesel. SEE THIS! Quote Link to comment Share on other sites More sharing options...
CafeJr Posted March 29, 2018 Author Share Posted March 29, 2018 You can do a lot with Diesel. SEE THIS! Thanks... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.