Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dont get Feature name that is suppress

3 REPLIES 3
Reply
Message 1 of 4
Darkforce_the_ilogic_guy
233 Views, 3 Replies

Dont get Feature name that is suppress

Is there a way to make it only get Featurename that is not suppresse ?

3 REPLIES 3
Message 2 of 4

sub main ()
For Each brow In brows
AssemblyFeature =""
Dim rDoc As Document
rDoc = brow.ComponentDefinitions.Item(1).Document


listFeatures(rDoc)
Next

end sub

Public Sub listFeatures(doc As Document)

Dim def = doc.ComponentDefinition
For Each feature As PartFeature In def.Features
'Dim txt = String.Format("{0,-30}", doc.DisplayName) & "|" & feature.Name
Dim txt = "|" & feature.Name
txt = txt
debug("Feature " & txt)
AssemblyFeature = AssemblyFeature & " " & txt
' txt = txt & System.Environment.NewLine
' IO.File.AppendAllText(outputFile, txt)
Next
End Sub

Message 3 of 4

I'm definitely not an iLogic expert, but something like this I imagine:

 

Sub main ()
For Each brow In brows
AssemblyFeature =""
Dim rDoc As Document
rDoc = brow.ComponentDefinitions.Item(1).Document


listFeatures(rDoc)
Next

End Sub

Public Sub listFeatures(doc As Document)

Dim def = doc.ComponentDefinition
For Each Feature As PartFeature In def.Features
If Feature.IsActive(Feature.name) <> False
'Dim txt = String.Format("{0,-30}", doc.DisplayName) & "|" & feature.Name
Dim txt = "|" & Feature.Name
txt = txt
debug("Feature " & txt)
AssemblyFeature = AssemblyFeature & " " & txt
' txt = txt & System.Environment.NewLine
' IO.File.AppendAllText(outputFile, txt)
End If
Next
End Sub
  Expert Elite
  Inventor Certified Professional
Message 4 of 4

@Darkforce_the_ilogic_guy 

 

This could help you,

 

Dim opart As PartDocument = ThisApplication.ActiveDocument
Dim oDef As ComponentDefinition = opart.ComponentDefinition
Dim oFea As PartFeatures = opart.ComponentDefinition.Features


For Each oFeature As PartFeature In opart.ComponentDefinition.Features

If oFeature.Suppressed = True
	MessageBox.Show(oFeature.Name, "Suppressed Features")
	
Else
End If
Next

Bhavik Suthar

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report