Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The questions of Inventor API help document

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
463 Views, 1 Reply

The questions of Inventor API help document

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?

1 REPLY 1
Message 2 of 2
xiaodong_liang
in reply to: Anonymous

  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/

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report