Jump to content

How to capture two autocad applications?


Recommended Posts

I am using two monitors. I open a separate AutoCAD application for each monitor. When I run a macro via Excel VBA, I can only capture the AutoCAD application that I first opened. I couldn't find a solution to capture the other application as well. Is there any solution? What I want to do is run the macro in the dwg file I selected.

Link to comment
Share on other sites

Why 2 applications you can have 1 big CAD across 2 screens and have 2 windows open, re code may need to set which window is active before running the excel. Split the Excel into 2 functions get the object application then set active window bit like Excel set active sheet, so no real ideas past this point. Other than this may provide some clues.



(setq acDocs (vla-get-documents (vlax-get-acad-object)))
(vla-put-activedocument (vlax-get-acad-object) (vla-item acdocs 1))


Link to comment
Share on other sites

The reason I use 2 applications is because I open more than 15 dwg files. I separate the files according to their properties and put them in separate applications. In this way, I can organize files more easily.

I don't have this problem as I can create Floating Drawing Windows in newer versions of Autocad but since old versions are installed in the office, I encounter this Excel problem. Thank you for the advice.


Link to comment
Share on other sites

This might be something better asked in an Excel or Microsoft forum. If you are initiating this through Excel, this would be more an Excel issue.


What version of AutoCAD is at the office?


Lots of examples running batch on files, including .dwg/.dxfs, etc. why do they need to be opened in two instances of AutoCAD, no need to make life more difficult if unnecessary?


I realize you have your preference and may be possible, VBA might not be the best route, it would help to know what you are trying to do.







Link to comment
Share on other sites

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.

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...