vlax-curve Help

Discussion in 'AutoCAD' started by Clive, Aug 12, 2003.

  1. Clive

    Clive Guest

    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)
     
    Clive, Aug 12, 2003
    #1
  2. 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
     
    Jason Piercey, Aug 12, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.