Message 1 of 2
API - All Assembly Parts - Set End Of Part to Top Or Bottom

Not applicable
06-05-2013
12:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So, I have a snippet of code that I want to go through my assembly and roll the end of all parts up to expedite calculations. The issue is, it is grabbing the proxies instead of the actual components, so it throws an error.
Dim oDoc as Document oDoc = ThisDoc.Document Dim oOcc as ComponentOccurrence Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = oDoc.ComponentDefinition For Each oOcc In oAsmCompDef.Occurrences.AllLeafOccurrences If oOcc.Definition.Type <> ObjectTypeEnum.kAssemblyComponentDefinitionObject Then oOcc.ComponentDefinition.SetEndOfPartToTopOrBottom(True) End If Next