tags in Connect Edition - user origin

How can I access tag's 'user origin' in Connect Edition? We are using tags moved relative to the cell origin and work with that offset. Is interface based and/or vba based access possible? (if I find the insert media button somwhere i will attach images)
Parents
  • I  don't think that the TagElement API has changed between MicroStation V8i and CONNECT.  There are two properties that you should find useful...

    TagElement.Origin  ' A TagElement's origin is a point on the base element. The origin changes when the base element is moved
    TagElement.Offset  ' A TagElement's offset is the distance between the tag element and the base element

    If you want the tag element's origin, add those two Point3d...

    Function CalculateTagOrigin (ByVal oTag As TagElement) As Point3d
      Dim tagOrigin As Point3d
      tagOrigin = Point3dAdd (oTag.Origin, oTag.Offset)
      CalculateTagOrigin = tagOrigin
    End Function

     
    Regards, Jon Summers
    LA Solutions

  • (so meanwhile I can add pictures)

    We were accessing the offset with the element information and PropertyHandler.

    The user origin information is missing in ConnectEdition's interface.

    So we have to check wheather we can switch this to Jon's suggested concept with TagElement:Offset.

       

  • Ingo said:
    (so meanwhile I can add pictures)

    Thanks for the pictures, it's much better than only the written description.

    Ingo said:
    We were accessing the offset with the element information and PropertyHandler.

    This is very important information missing in the original post! PropertyHandlers allow to access information displayed in MicroStation GUI. But these information are not equal to internal API as they can be published by MicroStation applications, calculated on the fly etc. They should be always the "last chance solution" if the data cannot be retrieved by API.

    Of course a question is why User Origin is not displayed in CONNECT Edition Element Property dialog anymore, but I have to admit I don't recall any case this information has been used by a user ... except you. So maybe User Origin was removed in CONNECT Edition because it has become treated as useless for users.

    Ingo said:
    So we have to check wheather we can switch this to Jon's suggested concept with TagElement:Offset.

    Jon's solution is the only correct, not to use PropertyHandler. As demonstrated in Jon's example, what is displayed in V8i a tag's "User Origin" is equal to (tag.Origin + tag.Offset) in VBA API. And the code is even simpler than to use PropertyHandlers.

    With regards,

      Jan

Reply
  • Ingo said:
    (so meanwhile I can add pictures)

    Thanks for the pictures, it's much better than only the written description.

    Ingo said:
    We were accessing the offset with the element information and PropertyHandler.

    This is very important information missing in the original post! PropertyHandlers allow to access information displayed in MicroStation GUI. But these information are not equal to internal API as they can be published by MicroStation applications, calculated on the fly etc. They should be always the "last chance solution" if the data cannot be retrieved by API.

    Of course a question is why User Origin is not displayed in CONNECT Edition Element Property dialog anymore, but I have to admit I don't recall any case this information has been used by a user ... except you. So maybe User Origin was removed in CONNECT Edition because it has become treated as useless for users.

    Ingo said:
    So we have to check wheather we can switch this to Jon's suggested concept with TagElement:Offset.

    Jon's solution is the only correct, not to use PropertyHandler. As demonstrated in Jon's example, what is displayed in V8i a tag's "User Origin" is equal to (tag.Origin + tag.Offset) in VBA API. And the code is even simpler than to use PropertyHandlers.

    With regards,

      Jan

Children
No Data