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

How do make a block of many lines

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
169 Views, 2 Replies

How do make a block of many lines

Hi,
I'm using a lisp that draws these kind of stuff.(attached file)
It is made of lines and arcs.But i was wondring what should i add to routine
that it makes these lines and arcs one block.Perhaps some vla functions???
Thanks,
M
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Martin,

Can you add these entities to a selection set as they are created?

(setq ss (ssadd)) ;creates empty ss.

Then save the entities as they are created.

(vl-cmdf ".arc" p1 p2 p3)
(ssadd (entlast) ss)

Do this for each entity then pass the ss to your block make routine.

Bill
Message 3 of 3
Anonymous
in reply to: Anonymous

Hi Martin
Here is a quick example how to do it

~'J'~

[code]
(defun C:polt()
(setvar "cmdecho" 0)
(setq bname (getstring T "\nBlock Name : "))
(if (not (tblsearch "block" bname))
(progn
(prompt "\n\t >> Select entities to add to block >>")
(setq ss (ssget))
(setq inspt (getpoint "\n\t >> Specify insertion point (use osnaps) >>"))
(command "_.-BLOCK" bname inspt ss "")
)
(progn
(alert (strcat "\n\t >> Block " "\"" bname "\"" " does exists")
(exit)
(princ)))
)
(setvar "cmdecho" 1)
(princ)
)
(princ "\n\t***\tStart command with POLT \t***")
(princ)
[/code]

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

Post to forums  

Autodesk Design & Make Report

”Boost