DG Annotation Formats

In the "Manage Datagroup Annotation" dialog, there is a dropdown list of unit formats. I want to get a "MU Label " format which currently isn't in that list...

Anyone knows where can I access the existing vbas so I can copy/modify? 

Parents
  • Chris,

    MU Label is not available as an option, but you can use a vba to generate any format you want.  The "Custom" format will ask you to provide a project, module and Function in a vba.  The datagroup annotation tool will pass the value of the field to the vba as a string based key-in argument and then expect to get the reformatted field passed back from the function as a string based key-in argument.  The mvba does not need to be loaded when the annotation is updated as long as it is in a folder listed in the MS_VBASEARCHDIRECTORIES configuration variable.

    There are 2 examples provided with AECOsim Building Designer that use the custom format.  The Advanced Space Label and the Advanced Door Tag.  The MVBA that drives them is DG_Annotation.mvba and you can find it in the vba folder of the US_Dataset (and possible others also).

    The simplest of the functions is Area.  It takes in the area of a space, rounds the area to a set number of decimal places and then returns the area with "Sq" plus the Master unit label.

    Public Sub Area()    Dim sSpaceArea As String    Dim iNumberOfDecimals As Integer     'Change the value of iNumberOfDecimals to control    'the number of decimals to show in the Actual Area calculation    iNumberOfDecimals = 0     SpaceArea = KeyinArguments    sSpaceArea = CStr(Round(Val(SpaceArea), iNumberOfDecimals)) & " Sq" & ActiveModelReference.masterUnit.Label    KeyinArguments = sSpaceAreaEnd Sub

    One warning: because the VBA does have to run for each piece of annotation that uses it, you could see a performance hit in Dynamic Views that contain a large number of annotations that reference a vba.

    -Noel



  • OK many thanks Noel, I'm not particularly vba-savvy but I'll give it a go...Dimensions must use another process since the syles provide MU-Label option... It is on the other hand such an indispensible/obvious one we need...

    Just as a matter of interest, where are the available format options in the Manage Datagroup Annotation coded?

Reply Children