Hi Everybody
I got the help of Autodesk Developer Phillipe in Aligning the dimension through i-logic code.
It works fantastic generally for all the view in drawing
But Is it possible to use the code for a particular view in a drawing?
Could anyone can give me solution. Following is the code written in VB.Net
Dim doc As Inventor.DrawingDocument
doc = inventorApp.ActiveDocument
Dim ActiveSheet As Inventor.Sheet
ActiveSheet = doc.ActiveSheet
Dim dimensions As Inventor.ObjectCollection
dimensions = inventorApp.TransientObjects.CreateObjectCollection
Dim drawDim As Inventor.DrawingDimension
For Each drawDim In ActiveSheet.DrawingDimensions
If Not TypeOf drawDim Is Inventor.OrdinateDimensionSet _
And Not TypeOf drawDim Is Inventor.BaselineDimensionSet _
And Not TypeOf drawDim Is Inventor.ChainDimensionSet Then
Call dimensions.Add(drawDim)
End If
Next
Call ActiveSheet.DrawingDimensions.Arrange(dimensions)
wrong thread...
Hi Prasad,
This is a good one. As the dimensions in a drawing are defined at sheet level and not at view level, you may not find any element to differenciate which ones belong to a specific view.
The only way I can think of is using attributes to "mark" those dimensions belonging to a view. Then you could only add those ones to the ObjectCollection to be arranged.
In order to get familiar with attributes and also to get the very useful Attribute Helper Add-in developped by Brian Etkins, the place to start is here:
http://modthemachine.typepad.com/my_weblog/2009/07/introduction-to-attributes.html
It might be a little confusing at the beggining (it as for me), but it is a very useful method to mark elements in a drawing (also in parts and assemblies) and then retrieve them using the Attribute Manager. It is worth investing some time in it.
I hope this may help you.