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

using Autocad Electrical API in a script

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
gcsjlewis
531 Views, 2 Replies

using Autocad Electrical API in a script

Could someone help me out with the following.....I am writing to a script file like so:

 

(setq scrfile "T:\\Acad_Autolisps\\Scripts\\New_Project_Scripts\\ai_insert.scr")

(setq scr (open scrfile "w"))

(write-line (strcat "_open\n\"" ai_dwgname "\"") scr)

The next line i am having issues with.  I need to write the following line exactly as is to the script file.  I have tried a couple of different ways but it will execute the command instead of writing to the script file.  If i copy and paste the following directly into the script, and run the script, it works fine.

 

 (c:wd_inplc_nd (list 26.5 20.5 0.0) "8" "00.00.00" nil nil 1 18 1 "V" (c:wd_find_sel_plc "1756-if16") nil)

 

How would i do this?

 

Thanks...

 

 

2 REPLIES 2
Message 2 of 3
hmsilva
in reply to: gcsjlewis

Try

 

(write-line (strcat "(c:wd_inplc_nd (list 26.5 20.5 0.0) \"8\" \"00.00.00\" nil nil 1 18 1 \"V\" (c:wd_find_sel_plc \"1756-if16\") nil)") scr)

 

HTH

Henrique

EESignature

Message 3 of 3
gcsjlewis
in reply to: hmsilva

Perfect! !

________________________________
The information contained in this message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately, and delete the original message.

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

Post to forums  

Autodesk Design & Make Report

”Boost