Jump to content

Recommended Posts

Posted

My VBA application requires info from one drawing to be used in another one in the same VBA running session.

 

I need to ALIGN one drawing based upon 3 3D points from another draiwng automatically.

 

At the moment I'm running my application to collate the info from drawing 1, store it, close my application to open the other drawing and run my application again to retrieve the info to ALIGN it.

 

Any idea how I can switch to another loaded drawing in the same VBA running session?

 

Thanks!

Posted

I've narrowed the problem down:

 

I've created a combobox to switch drawings whilst my application is running and even ACTIVATE and REGEN the selected drawing:

 

ThisDrawing.Application.Documents.Item(ComboBox1.ListIndex).Activate

ThisDrawing.Application.Documents.Item(ComboBox1.ListIndex).Regen acAllViewports

 

all works fine, BUT

 

The GETPOINT line is only successful in the drawing that was active BEFORE I started my application and Fails in the other activated drawing:

 

The error I get in all other drawings I select and activate:

 

error.jpg

 

Anyone any idea what's need to be set before I can use it in the newly activated drawing?

 

Thanks

Posted
I've narrowed the problem down:

 

I've created a combobox to switch drawings whilst my application is running and even ACTIVATE and REGEN the selected drawing:

 

ThisDrawing.Application.Documents.Item(ComboBox1.ListIndex).Activate

ThisDrawing.Application.Documents.Item(ComboBox1.ListIndex).Regen acAllViewports

 

all works fine, BUT

 

The GETPOINT line is only successful in the drawing that was active BEFORE I started my application and Fails in the other activated drawing:

 

The error I get in all other drawings I select and activate:

 

error.jpg

 

Anyone any idea what's need to be set before I can use it in the newly activated drawing?

 

Thanks

 

 

have you already tested this proposal?

Posted

Hi RICVBA,

 

Yep, just tested it, it failed again and replied on the other forum with more details (Watch state).

 

Thanks

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