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?
Solved! Go to Solution.
Solved by xiaodong_liang. Go to Solution.
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 ‘ExtrudeFeatures.AddByDistanceExtent’ has been removed.
2. the argument of old method ExtrudeFeatures.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/