Jump to content

error: ActiveX Server returned the error: unknown name: "ADDDIMARC"?


Recommended Posts

Posted (edited)

Hi, I don't have much knowledge about lisp, I need help members. Thanks.

AddDimArc Method:

RetVal = object.AddDimArc(ArcCenter, FirstEndPoint, SecondEndPoint, ArcPoint)

I test it:

(defun c:test()
(vl-load-com)
(setq arc (car (entsel)))
(setq arcobj (vlax-ename->vla-object arc))
(setq sp (vlax-curve-getstartpoint arcobj))
(setq ep (vlax-curve-getendpoint arcobj))
(setq cpt (vlax-get arcobj 'Center))
(setq p3 (getpoint cpt))
(vlax-invoke arcobj 'AddDimArc cpt sp ep p3)
);end

What is error: ActiveX Server returned the error: unknown name: "ADDDIMARC"?

Edited by SLW210
Added Code Tags!
Posted (edited)

You need to tell AutoCAD where to "add" the dim.

 

(defun c:test(/ thisdrwing mspace arc acrobj sp ep cpt p3)
  (vl-load-com)
  (setq thisdrawing (vla-get-activedocument (vlax-get-acad-object)))
  (setq mspace (vla-get-modelspace thisdrawing))
  ...
  (vla-adddimarc mspace cpt sp ep p3)

 

 

https://www.afralisp.net/archive/methods/listb/adddimaligned_method.htm

 

 

Edited by mhupp
  • Like 1
  • 9 months later...
Posted

 

On 1/12/2023 at 8:14 PM, mhupp said:

You need to tell AutoCAD where to "add" the dim.

 

(defun c:test(/ thisdrwing mspace arc acrobj sp ep cpt p3)
  (vl-load-com)
  (setq thisdrawing (vla-get-activedocument (vlax-get-acad-object)))
  (setq mspace (vla-get-modelspace thisdrawing))
  ...
  (vla-adddimarc mspace cpt sp ep p3)

 

 

https://www.afralisp.net/archive/methods/listb/adddimaligned_method.htm

 

 

Thank you for hepl me! 

Posted

You can check the available properties & methods for any given ActiveX object using the vlax-dump-object function, for which I have provided a utility program here.

Posted

2 suggestions

 

(setq arc (car (entsel "\nPick an Arc ")))

(setq p3 (getpoint cpt "\nPick new dim point for arc "))

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...