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

Spline to pline

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
370 Views, 8 Replies

Spline to pline

is there a routine which one can use to convert a spline to a polyline?

thanks

Colin
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

Colin, What do you hope to accomplish? Would you want the translated version to be a spline curve fit pline or one that uses straight or arc curved segments to most closely approximate the spline curve? Regards, Doug "colin1234" wrote in message news:7967882.1096020604543.JavaMail.jive@jiveforum2.autodesk.com... > is there a routine which one can use to convert a spline to a polyline? > > thanks > > Colin
Message 3 of 9
BillZ
in reply to: Anonymous

If you just want a facsimile of your spline:

Use the measure command at desired distance and use the points to draw you pline. This can be done programically.

Untested:

(defun dup_spline (/ ent d1)
(setq ent (car (entsel "\nselect spline")))
(setq d1 (getdist "\nDistance between points."))
(command ".measure" ent d1)
(setq ptlist (ssget "P"))

(setq cnt 0)
(command ".pline")
(repeat (sslength ptlist)
(setq pt (cdr (assoc 10 (entget (ssname ptlist cnt))))
cnt (1+ cnt))
(command pt)
)
(command "cl")
;(entdel ent) ;remove semi colin to del spline
)

Bill
Message 4 of 9
BillZ
in reply to: Anonymous

Oh yeah,

If you want the points removed add (command ".erase" ptlist "")

(defun dup_spline (/ ent d1)
(setq ent (car (entsel "\nselect spline")))
(setq d1 (getdist "\nDistance between points."))
(command ".measure" ent d1)
(setq ptlist (ssget "P"))

(setq cnt 0)
(command ".pline")
(repeat (sslength ptlist)
(setq pt (cdr (assoc 10 (entget (ssname ptlist cnt))))
cnt (1+ cnt))
(command pt)
)
(command "cl")
;(entdel ent) ;remove semi colin to del spline
(command ".erase" ptlist "")
)

Bill
Message 5 of 9
Anonymous
in reply to: Anonymous

I want the polyline to match the spline line such that after conversion i can change the width of the polyline easily to suit the purposes of the drawing.
Message 6 of 9
Anonymous
in reply to: Anonymous

The FLATTEN command in 2004 and 2005 will convert it. "colin1234" wrote in message news:7967882.1096020604543.JavaMail.jive@jiveforum2.autodesk.com... > is there a routine which one can use to convert a spline to a polyline? > > thanks > > Colin
Message 7 of 9
BillZ
in reply to: Anonymous

Thanks Jim.

I didn't know that.



Bill
Message 8 of 9
Anonymous
in reply to: Anonymous

http://www.dotsoft.com/freestuff.htm download spl2pl.vlx spl2pl converts a selection set of splines to polylines inside the drawing. "colin1234" wrote in message news:7967882.1096020604543.JavaMail.jive@jiveforum2.autodesk.com... > is there a routine which one can use to convert a spline to a polyline? > > thanks > > Colin
Message 9 of 9
Anonymous
in reply to: Anonymous

Hi Colin [code] (command "_.DXFOUT" "Temp.dxf" "_OBJ" MySplinesSelectionSet "" "_VER" "_R12" "_BIN" "_.DXFIN" "Temp.dxf" ) [/code] Cheers -- Juerg Menzi MENZI ENGINEERING GmbH, Switzerland http://www.menziengineering.ch

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

Post to forums  

Autodesk Design & Make Report

”Boost