- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
i have an existing Extrusion. I won't to change this from increase to cut out.
The name of the Extrsion is "Bohrungen"
Source
Won't change to:
Hole thrue all
I have found a code that change the direction but i don't know to change the extrusion to Cut thrue.
Here is the code that i have now:
SyntaxEditor Code Snippet
Sub Main Dim extrude As ExtrudeFeature = TryCast(Feature.InventorFeature("Bohrungen"), ExtrudeFeature) Dim extent As DistanceExtent = TryCast(extrude.Extent, DistanceExtent) If Noppen = True Then extent.Direction = PartFeatureExtentDirectionEnum.kPositiveExtentDirection Else extent.Direction = PartFeatureExtentDirectionEnum.kNegativeExtentDirection End If End Sub
I have tested with the kCutOperation, but i don't know how?
Sincerely
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I created a deck feature using this method. The 'Operation' property of the ExtrusionDefinition of the ExtrusionFeature is what you are after aka ExtrudeFeature.Defnition.Operation
Dim edDeck As ExtrudeDefinition = cdCarDeck.Features.ExtrudeFeatures.CreateExtrudeDefinition(skDeckProfile.Profiles.AddForSolid, PartFeatureOperationEnum.kNewBodyOperation)
edDeck.SetDistanceExtent(RowCar.DeckWidth * 2.54, PartFeatureExtentDirectionEnum.kSymmetricExtentDirection)
Dim efDeck As Inventor.ExtrudeFeature = cdCarDeck.Features.ExtrudeFeatures.Add(edDeck)
extrusionDefinition.Operation=PartFeatureOperationEnum.kCutOperation 'and all other types
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
ExtrudeDefinition Object
Operation
Read-write property that gets and sets the type of operation used to add the feature to the model. Valid inputs are kNewBodyOperation, kJoinOperation, kCutOperation, kIntersectOperation and kSurfaceOperation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
thank you for your help ![]()
I only have a little problem.
I have change the Operation to kCutOperation, thats work fine, but i won't that there is no distance - only thrue all.
Can you help me again? Witch parameter is responsible for the "thrue" option?
Thanks ![]()
Sincerely
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
oEF = Feature.InventorFeature(“Bohrungen”)
oEF.Definition.SetThroughAllExtent(kNegativeExtentDirection)
oEF.Operation = kCutOperation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI there, I'm building a very simple illogic rule to turn features on and off based on a parameter. in one case I need to flip one of the extrude features. I'm unsure how to insert your code into my rule can you provide some guidance?
If Vertical_Divider = "Full" Then
Feature.IsActive("vDivider Base") = True
Feature.IsActive("vDivider Top") = True
ElseIf Vertical_Divider = "None” Then
Feature.IsActive("vDivider Base") = True
(here I need to flip the vDivider Base asymmetric extrusion from 9,0.5 to 0.5,9)
Feature.IsActive("vDivider Top") = False
ElseIf Vertical_Divider = "Upper" Then
Feature.IsActive("vDivider Base") = False
Feature.IsActive("vDivider Top") = True
End If
Thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
vDividerBase=Feature.InventorFeature("vDivider Base")
vDividerBase.Definition.SetDistanceExtentTwo = 0.9
vDividerBase.Definition.SetDistanceExtent = 0.05