limfx Posted January 12, 2023 Posted January 12, 2023 (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 January 12, 2023 by SLW210 Added Code Tags! Quote
mhupp Posted January 12, 2023 Posted January 12, 2023 (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 January 12, 2023 by mhupp 1 Quote
limfx Posted November 8, 2023 Author Posted November 8, 2023 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! Quote
Lee Mac Posted November 8, 2023 Posted November 8, 2023 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. Quote
BIGAL Posted November 8, 2023 Posted November 8, 2023 2 suggestions (setq arc (car (entsel "\nPick an Arc "))) (setq p3 (getpoint cpt "\nPick new dim point for arc ")) Quote
Recommended Posts
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.