1 Reply Latest reply on Jun 19, 2018 3:44 PM by Matt Camacho-Cook

    How to get the current use of Datums in a drawing?

    William Miller

      Hi all,

       

      I am trying to log what letters have already been used as a datum, so I can re-label some drawing views around it. While I have the re-labeling function working properly, I can't find anything on line that gets the already used letters of datums.

       

      Anyone have any ideas?

        • Re: How to get the current use of Datums in a drawing?
          Matt Camacho-Cook

          I think you would have to loop thorough all the drawing's annotations and check for a datum tag (see swAnnotationType_e) with IAnnotation.GetType.  Then use IAnnotation.GetSpecificAnnotation to get the IDatumTag interface.  Then you can use IDatumTag.GetLabel to get the letter.  Keep track of all the letters used or create a function that always returns the higher of two letters (in alphabetical order) so you always have the latest letter used.