02-21-2019
11:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-21-2019
11:10 PM
Hi,
I have trouble with elementary code in VBA.
That code is to edit component as shown in the below.
It works in top assembly,but doesn't work in editing sub assembly from within top assembly.
What exactly needs changed to allow this to work?
Sub EDIT_COMPONENT() Dim oAsmDoc As AssemblyDocument Set oAsmDoc = ThisApplication.ActiveEditDocument Dim oAsmCompDef As ComponentDefinition Set oAsmCompDef = oAsmDoc.ComponentDefinition Dim oOcc As ComponentOccurrence Set oOcc = oAsmCompDef.Occurrences.Item(1) oOcc.EDIT End Sub
Solved! Go to Solution.