The questions of Inventor API help document

The questions of Inventor API help document

Anonymous
Not applicable
784 Views
1 Reply
Message 1 of 2

The questions of Inventor API help document

Anonymous
Not applicable

Sorry! May I ask some basic questions about API help? Thanks

-----------------------------------------------------------------------------------

' Create an extrusion.    

Dim oExtFeature As ExtrudeFeature

Set oExtFeature = oPartDoc.ComponentDefinition.Features.ExtrudeFeatures.AddByDistanceExtent _

         (oProfile, 1#, kSymmetricExtentDirection, kJoinOperation)

---------------------------------------------------------------------------------

As above partial code, according to admapi_17_0 help (Inventor 2013),

1) How can I to find and know the method AddByDistanceExtent along ExtrudeFeature?

    ** AddByDistanceExtent is not be listed within methods of ExtrudeFeatures.

2) What it mean '1#'?  Where is it within API help?

3) Are there any more detail API user guide or manual of Inventor?

0 Likes
Accepted solutions (1)
785 Views
1 Reply
Reply (1)
Message 2 of 2

xiaodong_liang
Autodesk Support
Autodesk Support
Accepted solution
  1. from 2012, the API workflow of ExtrudeFeature has been changed to firstly create the ExtrudeDefition and then create the feature by the definition. e.g.

Sub test()

 

Dim oDoc As PartDocument

Set oDoc = ThisApplication.ActiveDocument

 

Dim oDef As PartComponentDefinition

Set oDef = oDoc.ComponentDefinition

 

' assume some sketches geometries are available

Dim oNewSketch As PlanarSketch

Set oNewSketch = oDef.Sketches(1)

 

Dim oProfile As Profile

Set oProfile = oNewSketch.Profiles.AddForSolid(True)

 

Dim oExtrudes As ExtrudeFeatures

Set oExtrudes = oPartDef.Features.ExtrudeFeatures

 

'create ExtrudeDefinition

Dim oExtrudeDef As ExtrudeDefinition

Set oExtrudeDef = oExtrudes.CreateExtrudeDefinition(oProfile, PartFeatureOperationEnum.kJoinOperation)

 

'set more properties. e.g.

'oExtrudeDef.TaperAngle = 10

 Call oExtrudeDef.SetDistanceExtent(1, PartFeatureExtentDirectionEnum.kPositiveExtentDirection)

 

  ' create the extrude feature

 Dim oExtrudeF As ExtrudeFeature

 Set oExtrudeF = oExtrudes.Add(oExtrudeDef)

End Sub

And now, the old method ‘ExtrudeFeatu​res.AddByDistanceExtent’ has been removed.

 

2. the argument of old method ExtrudeFeatu​res.AddByDistanceExtent means the extent distance.

 

3. Inventor API help reference is the most comprehensive document. you can see the chapter [What’s New] to know the changes/advancements in the new releases. When you have any specific questions, the forum here or our blog site would be useful for you”:

 

http://adndevblog.typepad.com/manufacturing/

 

0 Likes