Finding Master Unit data in VBA without label

I am having some trouble with some VBA code to Insert Cells. The VBA code is not the problem, i have tracked the issue down to the UoRUnits as seen in this thread.

https://communities.bentley.com/products/microstation/f/microstation-forum/187632/text-size-multiplying-automatically---why?ReplySortBy=CreatedDate&ReplySortOrder=Ascending

My problem now is similar but not exactly the same. I am trying to adjust my code to factor in the units of the Default Model. All of these files are exported from AutoCAD to DGN.

The units of the File are in Metres, but there is no label. 

When i try to find the "Metres" values in VBA it shows nothing.

So my question is, how can i find the "Meters" value if there is no label?

Using V8i SS10

Thanks.

Parents
  • how can i find the "Meters" value if there is no label?

    A ModelReference has a MasterUnit property and a SubUnit property.  Each is a MeasurementUnit.

    A MeasurementUnit has a MsdMeasurementSystem and a MsdMeasurementBase that, together, tell what type of units the model has.  The UnitsPerBaseNumerator and the UnitsPerBaseDenominator provide the unit value. The Label aids human comprehension.

    The units of the File are in Metres, but there is no label

    A DWG file has no units.  The absence of a label in MicroStation is the result of importing a DWG without modification.  If you can, review the settings for opening a DWG file.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • how can i find the "Meters" value if there is no label?

    A ModelReference has a MasterUnit property and a SubUnit property.  Each is a MeasurementUnit.

    A MeasurementUnit has a MsdMeasurementSystem and a MsdMeasurementBase that, together, tell what type of units the model has.  The UnitsPerBaseNumerator and the UnitsPerBaseDenominator provide the unit value. The Label aids human comprehension.

    The units of the File are in Metres, but there is no label

    A DWG file has no units.  The absence of a label in MicroStation is the result of importing a DWG without modification.  If you can, review the settings for opening a DWG file.

     
    Regards, Jon Summers
    LA Solutions

Children