iLogic return Edit in place

iLogic return Edit in place

Log0ut
Enthusiast Enthusiast
546 Views
6 Replies
Message 1 of 7

iLogic return Edit in place

Log0ut
Enthusiast
Enthusiast

Hi

 

How I can use iLogic to return(exit) from part editing in assembly

0 Likes
547 Views
6 Replies
Replies (6)
Message 2 of 7

theo.bot
Collaborator
Collaborator

When you are editing an ComponentOccurrence you can use ExitEdit to go back to the parent.

theobot_0-1636018962010.png

 

Message 3 of 7

Log0ut
Enthusiast
Enthusiast

Can you write exact code?

0 Likes
Message 4 of 7

JelteDeJong
Mentor
Mentor

This is an example iLogic rule:

Dim doc As AssemblyDocument = ThisDoc.Document
Dim occurence As ComponentOccurrence = doc.ComponentDefinition.Occurrences.Item(1)

occurence.Edit()
MsgBox("The first occurence in your assmbly is now being edited." &
       " Click on 'ok' to return(exit) from part editing")

occurence.ExitEdit(ExitTypeEnum.kExitToTop)

  

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 5 of 7

Log0ut
Enthusiast
Enthusiast

Is it possible do it on part level?

0 Likes
Message 6 of 7

JelteDeJong
Mentor
Mentor

If you mean if its possible to do this from an PartDocument object, Then I don't think it's possible. 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 7 of 7

Log0ut
Enthusiast
Enthusiast

Find solution:

 

Dim aDoc As AssemblyDocument = ThisApplication.ActiveDocument
oOcc = aDoc.ComponentDefinition.ActiveOccurrence
oOcc.ExitEdit(ExitTypeEnum.kExitToTop)

 

Thanks for directions!