I wanna create the ordinate dimansion on the drawing.
Add(Intent As GeometryIntent, TextOrigin As Point2d, DimensionType As DimensionTypeEnum, ByRef DimensionStyle As [optional] VARIANT, ByRef Layer As [optional] VARIANT, Result As [out, retval] OrdinateDimension*)
How I can define GeometryIntent for function that was specified above.
All examples at the Inventor API Help is based on selection objects manually.
I wanna create the ordinate dimasions automatically. For this I need find/define the edge on the drawing view.
Indexer Property DrawingView.DrawingCurves may help you get the drawing curves enumerator that corresponds to the particular edge.
Dim oInvApp As Any = %%InventorApplication
Dim oDrawDoc As Any = oInvApp.ActiveDocument
Dim oSheet As Any = oDrawDoc.ActiveSheet
Dim oDrawViews As Any = oSheet.DrawingViews
Dim oDrawView As Any = oDrawViews.get_Item(1)
Dim oDrawingCurve As Any = oDrawView.DrawingCurves.get_Item(1)
Source code doesn't compile. I have the error message (see attached picture)
The DrawingCurves is the indexer property, Having the following Rule for finding the View (and the ISO view of the block+cone in it):
Rule FindView As Any Dim oInvApp As Any = %%InventorApplication Dim oDrawDoc As Any = oInvApp.ActiveDocument Dim oSheet As Any = oDrawDoc.ActiveSheet Dim oDrawViews As Any = oSheet.DrawingViews Dim oDrawView As Any = oDrawViews.get_Item(1) Return oDrawView End Rule
you may access:
1) All curves:
2) Specific occurrence ( should use GetHostObject())
When I tried to use GetHostObject() I got the error message (see attached picture). Do you know why?
This is my Child on the Sheet
Child sheetChild As :myView
model = partObjectToDetail
<partObjectToDetail> is assembly that has next code:
Child assyChild As :myAdoptPart, Quantity = myQty
The last questions.
Can I define DrawingCurve through API using names of edges from "Entity Naming Editor"? I don't know definitely indexes of curves on the drawing. I know just the names of edges.
Please have a look at the topic that discusses how faces store Intent attributes. The edges and vertices have the similar mechanism.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!
Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.