- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have tried to write a code for getting the part Dimension which get placed in Inventor , I have used Inventor API to retrieve the dimension
The problem is when I use this API , I get all the dimension including Sketch dimension and Part Dimension, but I want that my Drawing sheet should only contain Part dimension not Sketch dimension.
I have tried many ways to get rid of this problem but fail to do so
I also thought to delete the dimension once appear on drawing sheet but unable to do so
This is my code snippet
foreach (DrawingView view in drawingSheet.DrawingViews)
{
DrawingView view1 = drawingDoc.ActiveSheet.DrawingViews[1];
drawingDoc.ActiveSheet.DrawingDimensions.GeneralDimensions.Retrieve(view1);
for (int i = drawingDoc.ActiveSheet.DrawingDimensions.GeneralDimensions.Count; i > 0; i--)
{
GeneralDimension dimension = drawingDoc.ActiveSheet.DrawingDimensions.GeneralDimensions[i];
if (dimension.Type == ObjectTypeEnum.) //Don't know what to right after .
{
dimension.Delete();
}
}
}
I don't know is my method wrong or write , I am not sure what to write in this line
(dimension.Type == ObjectTypeEnum.)
After ObjectTypeEnum such that I can get rid of sketch dimension from Drawing sheet
Also if someone suggest some different and better way for viewing dimension will be a great pleasure
Thankyou in Advance
Solved! Go to Solution.