Lisp- No Function Definition

Lisp- No Function Definition

rmordov
Participant Participant
674 Views
1 Reply
Message 1 of 2

Lisp- No Function Definition

rmordov
Participant
Participant

I am running into the following error when attempting to use a custom lisp. "Error: no function definition: VLAX-ENAME->VLA-OBJECT" I found a few other posts regarding no function defintion but all were more customized to the specific lisp. I am newer to C3D and don't know much about writing my own lisp codes but have found several I use often. I've used this same lisp in the same drawing I'm getting the error in multiple times and have never run into this issue. Any ideas what might cause this problem out of nowhere? Thanks in advance!

 

The code is as follows:

(defun c:mlte (/) (c:MLeaderToExistingtext))
(defun c:MLeaderToExistingtext (/)
(vl-load-com)
(cond
;;Select the text/mtext objects
((or
(null (setq ss1 (ssget ":S" '((0 . "text,mtext")))))
(= 0 (setq ssl (sslength ss1)))
)
nil ;nothing selected
)
(T
(setq
Textobj (vlax-ename->vla-object (ssname ss1 0))
ActSpace (if (= 0 (getvar "cvport"))
(vla-get-paperspace
(vla-get-activedocument (vlax-get-acad-object))
)
(vla-get-modelspace
(vla-get-activedocument (vlax-get-acad-object))
)
)
StartPt (getpoint "\nPick location for point of arrow head: ")
txt (vla-get-TextString Textobj)

TextPt
(vla-get-insertionpoint textobj)
TextPt
(vlax-variant-value TextPt)
TextPt
(vlax-safearray->list TextPt)
ptlist
(vlax-make-safearray
vlax-vbdouble
'(0 . 5)
)
ptlist
(vlax-safearray-fill ptlist (append StartPt TextPt))
MLObj
(vla-addmleader
ActSpace
ptlist
'LeaderIndex
)
)
(vla-put-textstring mlobj txt)
(vla-delete Textobj)

)
)
)

 

Error Code.PNG

0 Likes
675 Views
1 Reply
Reply (1)
Message 2 of 2

ВeekeeCZ
Consultant
Consultant

That could be a major issue requiring reinstall... try to follow HERE   ... other than the first two.

0 Likes