I am working on a lisp file that lets you select a block and automaticaly change the layer and color in block editor. Afther this it exits block editor, deletes the original block and places the new one.
It works fine accept for the last part.
When i incert my new name whit the insert command it automaticaly changes the name whit autofil so it wil still pot my originial block (the new block name is only two characters shorter than the old one).
Is there eny way to work around this problem?
Thanks in advance!
P.S.: my apology's for the fact that my block is written in dutch
Solved! Go to Solution.
'Y' scale must be more than Zero, Please find the update in Below line.
(command "insert" bln (cdr (assoc 10 (entget obl))) "1" "1" "")
Thank you for this responce it solved my problem.
But how do you know which parameters you have to add? (like "1")
I do it simply by trial and error.
P.S.: i had to make a litle adjustment, because i deleted the block befor i used it i had to get the insertion point sooner:
(setq ip (cdr (assoc 10 (entget obl)))) ;bepalen invoeg punt voor block, dit moet hier gebeuren omdat de block zelf straks verwijderd is en er dan geen waardes meer van opgevraagd kunnen worden (command "erase" obl ;original block "" ) ;verwijder originele blcok (command "insert" bln ip "1" "1" "" )
That parameter is scale value of 'Y' Direction.... (you can change if you want to scaling your block).
Enter manualy "-insert" in command line, you can see the step by step Input...
(command "insert";Command bln;Block Name ip;Insert Point "1";Scale Value in X-Direction "1" ;Scale Value in Y-Direction "" ;Rotation Angle ("" for 0 degree") )
one more litle question:
Can this be done for every command?
Because i just tested it for saves and it doesn't work.
If you want to see the step by step procedure for Saveas command,
change filedia variable as "0", then try command saveas.....
Also refer below link for more clear..
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register