MessageBox - Only want's it to show 'After open Document' in the .iam

MessageBox - Only want's it to show 'After open Document' in the .iam

BRLMCHKD
Advocate Advocate
529 Views
5 Replies
Message 1 of 6

MessageBox - Only want's it to show 'After open Document' in the .iam

BRLMCHKD
Advocate
Advocate

Hi. 

Got this MessageBox, which works fine in the .iam

But it also show when I open the parent .idw - And I don't want it to.

How do I decode that?

2020-07-09_13-48-57.png 

0 Likes
Accepted solutions (2)
530 Views
5 Replies
Replies (5)
Message 2 of 6

ckeveryga
Advocate
Advocate
Accepted solution

 

oDoc = ThisDoc.ModelDocument

If oDoc.DocumentType = kAssemblyDocumentObject Then

'Message box here

End If

 

Edit: oDoc = ThisDoc.Document

Message 3 of 6

BRLMCHKD
Advocate
Advocate

Yes yes, works juust perfect 😊

0 Likes
Message 4 of 6

BRLMCHKD
Advocate
Advocate

Hi there.

 

Maybe I was too fast to accept this solution! 😮

 

If I haven't opened my  iam first, I still got the problem

that my rule 'fires' and show messageBox when I open the parent idw.

 

And I don't want it to!!  Only wants it to show when the iam is opened.

 

What to do?? 🤔

/BRL

 

 

 

 

2020-08-28_10-28-22.png

 

If I haven't o

0 Likes
Message 5 of 6

ckeveryga
Advocate
Advocate

oDoc = ThisApplication.Document

0 Likes
Message 6 of 6

ckeveryga
Advocate
Advocate
Accepted solution

Sorry, replace

oDoc = ThisDoc.ModelDocument

with 

oDoc = ThisApplication.ActiveDocument