Is there a way to make it only get Featurename that is not suppresse ?
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
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
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
Can't find what you're looking for? Ask the community or share your knowledge.