CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 8771
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedSwitching to another drawing in a running VBA sess

 Post Reply Post Reply
Author
arjen_broens View Drop Down
Newbie
Newbie


Joined: 16.May.2014
Location: United Kingdom
Using: AutoCAD 2000/2014 BricsCAD R14
Status: Offline
Points: 3
Direct Link To This Post Topic: Switching to another drawing in a running VBA sess
    Posted: 07.Oct.2017 at 16:26
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!
I Tego Arcana Dei
Back to Top
arjen_broens View Drop Down
Newbie
Newbie


Joined: 16.May.2014
Location: United Kingdom
Using: AutoCAD 2000/2014 BricsCAD R14
Status: Offline
Points: 3
Direct Link To This Post Posted: 08.Oct.2017 at 12:27
I've narrowed the problem down.

I can switch drawings now whilst my application is running.

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

The GETPOINT line is only successful in the drawing that was active before I started my application:

PrikPnt = ThisDrawing.Utility.GetPoint(Basepnt, PrikPointTexT)

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



Anyone any idea what's need to be set before I can use it?

Thanks

Edited by arjen_broens - 08.Oct.2017 at 12:27
I Tego Arcana Dei
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,355 seconds.