Right now I first draw the line and then label it I would like to combine these to operations.
sounds like a job for custom vba
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me
You should have no issues uploading a DGN, it only needs to contain a few elements, doesn't have to be an actual detailed drawing. If you are still having issues attaching, maybe upload it to WeTransfer and post a link to the download?
23-535.dgn
Much appreciated Barry! Any help would be great.
Hi Dusty,
I've made some progress with automating the dimensioning of the lot boundary lines. Unfortunately, there are a couple of significant roadblocks that have caused me some issues. I'm not sure if you are familiar with writing VBA Macro's or not but I will provide a detailed description of the issues regardless.
In VBA there is only 1 available method to create a Dimension Element: CreateDimensionElement1With this method you can create many different types of dimension, you need only specify the correct MsdDimType to the method's type parameter. With this I was able to successfully create the label dimension but with 2 major problems:
So that was as far as I got on Friday and after doing a bit of reading through old posts it seems that 1. is not possible in VBA because it doesn't have access to the dependency API, and I could find no posts that would shed any light on 2. So instead the only option left was to attempt to programmatically make use of the Dimension Element tool, calculate the mid-point of the line and provide that location as where data-points should be applied so that the Text is aligned to the centre of the line. Surprisingly it appears to work but I really dislike relying upon using key-ins, however, I simply have no choice as the VBA API doesn't contain what is needed to do the job without them.
I've not attempted to work on an arc tool yet, but this is how the macro operates for lines:
The above was not using my own workspace but a vanilla instance of MicroStation V8i SS10 in order to keep your source file with the settings as you have them. Is this the kind of thing that you had in mind?
Here is an old autodim MDL tool that I wrote for version 08.05 and still works in V8i.
https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/273/autodim.ma ForDim.dgn