- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
When trying to add a DrawingNote object, I've encountered some strange behaviour related to the positioning (Point2D) of it. At least that's what I think, but maybe there's some logic behind it? Does anyone have an explaination? Or is it a bug?
See code below, where the last line of code does position the text how I want it, but when commented out places it differently. I have not changed the Point2d as you can see, I've just set the GeneralNote position to the same Point2d as I did when initially placing it.
private void insertSheetNote(Sheet sheet)
{
TransientGeometry transientGeometry = InventorApp.TransientGeometry;
GeneralNotes generalNotes = sheet.DrawingNotes.GeneralNotes;
string noteText = "NOTE: This is \n" +
"my multiline \n" +
"test text.";
double textPositionY = sheet.Border.RangeBox.MaxPoint.Y - 0.35 - 1;
double textPositionX = sheet.Border.RangeBox.MinPoint.X + 0.35 + 2;
Point2d textPosition = transientGeometry.CreatePoint2d(textPositionX, textPositionY);
GeneralNote generalNote = generalNotes.AddFitted(textPosition, noteText);
generalNote.TextStyle.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft;
//generalNote.Position = textPosition;
}
This picture shows the note with the last line of code commented out:
This picture shows the note whit the last line of code active:
Anyone knows what's happening, or if it's a bug or something?
Solved! Go to Solution.