Reply

Assembly:How to update dispaly after replacing occurrence?

[ Edited ]

 

 

Hi,

how to update parent assembly display, after replacing occurrences via API?

After replacing a part occurrence with

pOccurrence->Replace(sComponentName,TRUE) ;

To update the display I must do

pOccurrence->Activate = !pOccurrence->Activate ;

This works for part occurrences, but not for assembly occurrences.

How to update the parent assembly, so that display is updated correctly?

Thanks in advance.

best Regards

Massimo

 

Posted by: Massimo Magris
Post date: 7/3/2009 12:27:48 PM

1 REPLY

RE: Assembly:How to update dispaly after replacing occurrence?

[ Edited ]

Massimo,

I didn't try all this, i'm shooting blind...

1. Are you using Application parameters that could be disturbing like .DelayCompute=False, .Interactive=False, etc...?

2. It could be a refreshing problem. Have you tried to refresh the screen? ActiveWindow.View.Update

3. You could try to combine refreshing with hide - show the occurrence:

Occurrence.Visible=False

ActiveWindow.View.Update

Occurrence.Visible=False

ActiveWindow.View.Update

4. You could try to open a new window for this document and close the existing one. I bet that this should refresh the asm for sure:

myWindow=objSE.ActiveWindow

objASM.NewWindow

myWindow.Close

 

5. If everything else fails, save,close and reopen the asm document

 

Well, if any of the above works, just tell us. It's always good to know...

Ciao,

Julian

 

Posted by: Julian Guillo
Post date: 7/7/2009 7:28:47 AM