Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Current folder name + drawing name into Dtext

2 REPLIES 2
Reply
Message 1 of 3
XIJIANGWOO
973 Views, 2 Replies

Current folder name + drawing name into Dtext

Hello again everyone.

 

Okay, I'm trying to learn how to put the folder name + dwg name into a string and then have the user place it in the prper position on a drawing. We currently use DTEXT and type the same folder name over and over again in hundreds of drawings. Is this somehting that I can easily do or is it a task not worth investigating?

 

Thanks in advance !

 

 

Xi

2 REPLIES 2
Message 2 of 3
XIJIANGWOO
in reply to: XIJIANGWOO

Ok, I can see that "Field" can be used.  I just upgraded to 2007 so i was not aware of this command.

 

    How could I customize the command so that I have the folder name & drawing name (minus the prefix) with a "-" spearating the 2 names?

 

Thanks, 

 

Xi

Message 3 of 3
southie
in reply to: XIJIANGWOO

This might get you started.  A  Simple solution showing functions. 

 

(setq a (getvar "dwgprefix"))

(setq b (getvar "dwgname"))

(setq c (strcat a b))


(setq d (vl-filename-directory c))

(setq e (vl-filename-base d))

(setq f (vl-filename-base c))

(setq g (strcat e "-" f))

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost