PDA

View Full Version : vlax-invoke



mahazen
2004-08-06, 10:59 PM
I'm trying to open a new drawing using vlax-invoke-method and can't seem to find what the required arguments for the "add" method. Does anyone have some ideas?

Jeff_M
2004-08-06, 11:56 PM
Something like this?


(defun new_dwg (name doc / )
(if (= (getvar "SDI") 0)
(vlax-invoke (vla-get-activedocument (vlax-get-acad-object)) "add" name)
(vlax-invoke (vlax-get-acad-object) "new" name)
)
)

mahazen
2004-08-07, 04:05 PM
Thanks for the info. I got it to work, but a little different from what you suggested:

(vlax-invoke-method (vla-get-documents (vlax-get-acad-object)) 'add)