02-25-2019
01:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-25-2019
01:50 AM
Hey @Olsndot ,
Here is updated code if you are getting document from ActiveEditDocument. Thanks for Rocky's suggestion.
Here is the updated code:
Sub EditUpdate()
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = ThisApplication.ActiveEditDocument
Dim oEditOccu As ComponentOccurrence
Dim oTopDoc As AssemblyDocument
If Not (oAsmDoc Is ThisApplication.ActiveDocument) Then
Set oTopDoc = ThisApplication.ActiveDocument
Set oEditOccu = oTopDoc.ComponentDefinition.ActiveOccurrence
End If
Dim oOcc As ComponentOccurrence
Set oOcc = oEditOccu.SubOccurrences(1)
oOcc.edit
End Sub

Jane Fan
Inventor QA Engineer