Hello all,
I am looking for some VBA help. I will do my best to describe what I'm looking to do. Hopefully I can get some help.
Background:
I have several drawings with outdated KEY Plans Referenced in *in different locations. I have updated the Key Plan Master File on the X axis to the Right of the original. (I.E. Original key plan shows 4 areas of building labeled EAST SECTION - EC SECTION - WC SECTION - WEST SECTION. New KEY PLAN now shows each floor + Area # making total of 5 Key Plans)
Goal:
I'd like to use some VBA code to look at the Reference file "Key Plan" offset location to locate itself against the master file. Then I'd like to select the Floor to decide which Key Plan will be Clipped. Following that decision use XY= to place a fence around the correct Key Plan then move this to a position based on a origin of the Titleblock meta Tag "MasterTag".
Example Prompt:
Basement = XY=50,50;XY=100,0
1st Floor = XY=150,50; XY=200,0
And so on......
This seems like a fairly simple task although I am not a VBA expert. And have no idea where to start.
Here is a basic concept of what I am trying to do in a script file format. The problem I have is the Key.DGN file isn't in the same location on every file. So my XY= commands don't work correctly.
<
#
dialog reference Open
SELVIEW 1;FIT ALL 1
M,ER[Delete Boundary]
#
place fence block
XY=146:7,180:11;XY=160:1,152:6
M,ER[Fence]
#
REFERENCE CLIP BOUNDARY *KEY.DGN
SELVIEW 1;FIT ALL 1
M,ER[Reference Boundary]
#
reference move *KEY.DGN
XY=0,0
XY=-43:6,0
dialog reference close
reset
SELVIEW 1
>
Thanks for the help.