Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Problems whit inserting block whit insert command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi
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!
Thomas
P.S.: my apology's for the fact that my block is written in dutch
Solved! Go to Solution.
Re: Problems whit inserting block whit insert command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Thomas,
'Y' scale must be more than Zero, Please find the update in Below line.
(command "insert" bln (cdr (assoc 10 (entget obl))) "1" "1" "")
R.Ranjith
Re: Problems whit inserting block whit insert command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Ranjith
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.
Regards
Thomas
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"
""
)
Re: Problems whit inserting block whit insert command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Thomas,
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")
)
R.Ranjith
Re: Problems whit inserting block whit insert command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Ranjith
one more litle question:
Can this be done for every command?
Because i just tested it for saves and it doesn't work.
Regards
Thomas
Re: Problems whit inserting block whit insert command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Thomas,
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..
http://www.afralisp.net/archive/methods/lista/save
R.Ranjith
