vlax-curve Help

Clive

Usenet Archive
Joined
Apr 28, 2001
Messages
9
Reaction score
0
Going through the help file i have done the file below but it dose not work

1) draw a pline on the screen and spline it.
2) then run the program

(defun c:spl
(Graphscr)
(setq ename-spline (car (entsel "\nPick a spline:")))
(setq vlaobject-spline (vlax-ename->vla-object ename-spline)) (setq objectid-spline (vla-get-objectid vlaobject-spline)) (setq startSpline (vlax-curve-getStartParam objectid-spline)) (setq endSpline (vlax-curve-getStartParam objectid-spline)) ;(Setq dft(vlax-curve-getDistAtParam p1 ( / (- endspline startspline) 2)))

(Princ objectid-spline)
(Princ)
)

I get this error
unable to get ObjectID: 2130361496

is the object id not "2130361496"

what is wrong? please Help

This is my first time in the VLAX world and I'll be the first to admit it I'm lost

Need loads of help
(If I were a boat at see I would be the Titanic)
 
Try this:

(setq obj (vlax-ename->vla-object (car (entsel "\npick a spline: ")))) (setq startParam (vlax-curve-getStartParam obj)) (setq endParam (vlax-curve-getEndParam obj))

your first argument need to be a vla-object, and you call (vlax-curve-getStartParam) twice
 

Latest threads

Back
Top