If I’m not mistaken there is no way to align note and dimension (even in standard UI). You can align dimensions using the ModelDocExtension::AlignDimensions method. In your case you need to implement this behavior manually:
- Extract the positions of Note/Dimension (Annotation::GetPosition).
- Change the X coordinate of note position to be equal to X coordinate of dimension position
- Reset the note position using the Annotation::SetPosition
Artem Taturevych, Application Engineer at Intercad (Australia)
translationXpert – add-in to translate SolidWorks models
myIntercad – an integrated tool for SolidWorks Professionals
It works now. I just need to get the position of the dimension and used it as reference in setting the position of the note.
Thank you very much!