Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/14/2023 in all areas

  1. Yep can be done tested with 3 dwgs open. Need a lisp to write the script reflecting number of dwg's currently open. Could add the (load "my zoom all layouts etc") the acDocs has a property "Count". (setq acDocs (vla-get-documents (vlax-get-acad-object))) (vla-put-activedocument (vlax-get-acad-object) (vla-item acdocs 0)) (setvar 'ctab "Model") (command "zoom" "E") (vla-put-activedocument (vlax-get-acad-object) (vla-item acdocs 1)) (setvar 'ctab "Model") (command "zoom" "E") (vla-put-activedocument (vlax-get-acad-object) (vla-item acdocs 2)) (setvar 'ctab "Model") (command "zoom" "E") (alert "all done") tested with Bricscad V20 Autocad ??
    1 point
  2. You'll only be able to use Script Writer on unopened drawings, else the drawings will be rendered as read-only to the script. Since the ActiveX zoomextents method is derived from the application class, you will only be able to invoke it on the current drawing, not those which are open but inactive. Furthermore, since LISP operates within the document namespace, you won't be able to active an inactive drawing and then issue a command, since, as soon as the drawing becomes active, the LISP evaluation will cease. Aside from using the .NET (C#/F#/VB) or ARX (C++) APIs, the only way that I could see this being accomplished is using a VBA function to send the command to the appropriate document - the late great Michael Puckett (MP) demonstrates this technique here.
    1 point
×
×
  • Create New...