Hi,
there must be some kind of precision error in calculation of perpendicularity of x and y vectors in vlisp. I get this error when tried to run the code below to add an ucs object to the active document.
Previously VBA coders came across this error and some of them wrote very tedious and complicated solution routines that I couldn't understand as a lisp programmer.
Code:
(defun c:ucc ()
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))
(setq ucsobj (vla-get-usercoordinatesystems adoc))
(setq origin (vla-getvariable adoc "UCSORG"))
(setq xdir (vla-getvariable adoc "UCSXDIR"))
(setq ydir (vla-getvariable adoc "UCSYDIR"))
(setq ucs_current (vla-add ucsobj origin xdir ydir "UCS_Current"))
)
any ideas to overcome this error? thanks