Message 1 of 2
Render Style in Assembly Part
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
i have written some code and it works well until the last line. The Name of the Feature is shown correctly but the RenderStyle doesn't change to Yellow.
The Error is: Wrong Parameter
Anyone any idea whats the problem?
Regards
Code:
Dim oAsmDoc As AssemblyDocument oAsmDoc = ThisApplication.ActiveDocument Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = oAsmDoc.ComponentDefinition Dim oOccurrence As ComponentOccurrence oOccurrence = oAsmCompDef.Occurrences.Item(1) Dim oPartDoc As PartDocument oPartDoc = oOccurrence.Definition.Document ' Get the second feature. Dim oFeature As PartFeature oFeature = oPartDoc.ComponentDefinition.Features.Item(1) MessageBox.Show(oFeature.Name) oFeature.SetRenderStyle(kOverrideRenderStyle, oPartDoc.RenderStyles.Item("Yellow"))