I am getting the following error when running this code from this post: http://forums.autodesk.com/t5/inventor-general-discussion/ilogic-drawing-dimension-alignment-for-par...
It is saying " 'Inventorapp' is not declared. It may be inaccessible due to its protection level."
Can anyone help? Am a complete novice at VB...
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)
Try
Dim doc As Inventor.DrawingDocument doc = ThisApplication.ActiveDocument Dim ActiveSheet As Inventor.Sheet ActiveSheet = doc.ActiveSheet Dim dimensions As Inventor.ObjectCollection dimensions = ThisApplication.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)
Can't find what you're looking for? Ask the community or share your knowledge.