Arranging Dimensions in Drawing Sheet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good Afternoon,
I have created a drawing sheet using C# , I also put dimensions in my sheet using the Inventor apis
All the things works perfectly except the arrangement
Below is the attached photo of my drawing sheet and the arrangement of the same which look mess and finding it difficulty to see the view and reading
I want the reading should look like this , separated and clearly visible
I have attached code below in which I have shown my method
Can someone guide me please as I have tried many many ways to do this but failed
Now with lot of hope I am writing this forum
The code snippet shown below uses "Retrieve" method to get all the dimension
DrawingView view1 = drawingDoc.ActiveSheet.DrawingViews[1];
drawingDoc.ActiveSheet.DrawingDimensions.GeneralDimensions.Retrieve(view1);
After getting all the dimensions I have run the another code for deleting similar dimension , and print only the dimensions which comes one time in Drawing sheet
foreach (GeneralDimension dimension in drawingDoc.ActiveSheet.DrawingDimensions.GeneralDimensions)
{
///MYCODE FOR DELETING THE ANGULAR AND REPETATING DIMENSIONS///
}
After doing this I have use another code snippet shown below to get arrange the dimension in proper view
but its not arranging properly
ObjectCollection arrange_dimen = inventor_app.TransientObjects.CreateObjectCollection();
foreach (GeneralDimension dimen in drawingDoc.ActiveSheet.DrawingDimensions.GeneralDimensions)
{
if (dimen.Type == ObjectTypeEnum.kLinearGeneralDimensionObject)
{
arrange_dimen.Add(dimen);
}
}
if (arrange_dimen.Count > 1)
{
drawingDoc.ActiveSheet.DrawingDimensions.Arrange(arrange_dimen);
}
Can someone guide me through this , how can I do this
I don't want to do major changes in my code just want to do this changes
Thankyou in Advance