Code Red > VB(A)

VBA in Microstation


David Hall:
Anybody doing VBA in Microstation?  I am trying to insert a DWG in a DGN, and i am super close, but cant find a few MS variables

CmdrDuh?! Oh my, how have you been?

No to the VBA in Microstation but can I help you track them down? My VBA is super rusty and my Mirostation VBA is far worse.

David Hall:
I have been good.  Working in Dallas now, and loving it.

What I am trying to do (in Autocad speak) is insert a dwg inside the titleblock in modelspace.  What I need is to capture the min and max of modelspace so I can scale the incoming dwg to fit in the border.  Seems like this should be really easy, but I cant find anything in the object browser that will give me the extents of the design file

I forgot that all of MS' docs are installed and not web based. But I did find a wiki that has some examples. The best I found so far is doing some of that on a small scale (one element scale).  Just wondering if you can build an array of elements and calculate the Range of that array (I doubt it, but I don't really have access to proper docs)? ...or just step through the array and locate the biggest/smallest X/Y value of each. Those min/max should be your extents?

David Hall:
I have found how to get my min/max, so now I can pick a point for lowerleft based on that value.  Now if I can figure out the dwg import piece.  Getting really close now


[0] Message Index

Go to full version