- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am writing what I thought would be a simple lisp to rotate my snapang based on a selected point of an existing entity. Part of the lisp uses the getFirstDeriv function at a selected location on the entity. The abbreviated code is as follows:
(defun c:oline ( / p1 p2 ent )
(vl-load-com)
(setq esel (nentsel "\nSelect an Object:"))
ent (car esel)
pt1 (getpoint "\nSelect Location of Intersection:"))
(princ pt1)
(setq pt2 (vlax-curve-getFirstDeriv ent (vlax-curve-getParamAtPoint ent pt1)))
(princ)
)
It works when I am in WCS and in a UCS if the base point is the same as the WCS base point. But, if I create a UCS that has a different basepoint than the WCS I get an error.
I think it might have something to do with a point translation of some kind but I can't figure it out. Any help would be appreciated.
Thanks
Solved! Go to Solution.