Help joining newly created polylines

Help joining newly created polylines

DC-MWA
Collaborator Collaborator
848 Views
3 Replies
Message 1 of 4

Help joining newly created polylines

DC-MWA
Collaborator
Collaborator

I'm working on a routine that calculates stairs and then draws a profile of the stairs.

I have calcs and the drawing of stair profile wotking. Problem is that each stair (riser and tread) are individual polyines.

I have attched a simplified version of this portion of the code.

As always, any input and assistance is greatly appreciated.

 

 

0 Likes
Accepted solutions (1)
849 Views
3 Replies
Replies (3)
Message 2 of 4

CodeDing
Advisor
Advisor

@DC-MWA,

 

Just responding on my phone, not at a computer. But by the looks of your lisp instead of using (command...) to create a polyline, I would recommend using (entmake).

 

Then while making a riser and tread, you can save your entity names in a list as you go and connect them later? I can look into this more tomorrow.

 

Best,

~DD

0 Likes
Message 3 of 4

dbhunia
Advisor
Advisor
Accepted solution

Try this....

 

(defun c:testst (/ getpt1 ss)
(setq ss (ssadd))
(setq getpt1 (getpoint "\nSelect start point: "))
(command ".pline" getpt1 (strcat "@6<90")(strcat "@11<0") "")
(ssadd (entlast) ss)
   (repeat 5
 	(command ".pline" "" (strcat "@6<90")(strcat "@11<0") "")
	(ssadd (entlast) ss)
   );end repeat
(command "pedit" "M" ss "" "J" "0" "")
(princ)
)

Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 4 of 4

DC-MWA
Collaborator
Collaborator

Prefect. I was easily able to adapt your added code to my larger lisp. Works great and did't seem to slow anything down.

Thank you so much!!!!!!!

0 Likes