Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Popup message on opening a CATPart

Status
Not open for further replies.

Mooseman

Computer
Jul 19, 2005
6
0
0
GB
Good Morning,

Does anyone know how to create a popup message that apears once on opening a CATPart.

I have a CATPart that has external links and I wish all users to open the "Feeder" document before working on the file. I can use a rule to popup a message every time the file requires an update, but this is annoying. If I new the KWA or KWE syntax for checking if an external link is populated then that would be ideal.

Any help from anyone would be appreciated.

Many thanks

Mooseman
 
Replies continue below

Recommended for you

can you please tell more about a rule which messages if update is needed?

yea it's a great idea to have a message at file opening. i also want to know how to do that..
 
You could create your own: "Open a Mooseman Part" VBA code that would check if a chosen part requires a feeder document, and if so, first open the feeder document, then open the part. I've done something similar with DXF parts to record a Path for automatically clicking a "SaveDXF" function, and for correcting text shift.
 
TiKito

create a string parameter = Update
Set the string with two text options from the dropdown = None and Stop
In KWE create a reaction
Source type = selection
Sources = Pick your top of part node in spec tree
available event = update
Action = knowledgeware action

text to be typed in action box

if Update== "None"{
Message("please update your links")
}


----------------------------

2briancox can you provide any of your VBA code?

 
I would say that there is plenty of code here in the forum for managing file opening through VBA. Try searching "Open part vba" in this forum.
 
ahh, I have had a look at the forum. I think you have miss understood I do not want the file to open via VBA but an automatic popup in CATIA when the part is opened by the user.
 
Mooseman can you please post this with pictures? pictures always a great guide.

TiKito

create a string parameter = Update
Set the string with two text options from the dropdown = None and Stop
In KWE create a reaction
Source type = selection
Sources = Pick your top of part node in spec tree
available event = update
Action = knowledgeware action

text to be typed in action box

if Update== "None"{
Message("please update your links")
}
 
figured out a little bit how to deal with messages, but my message pops up only after update and not on file open. the whole point is
to get a message on file open.

btw you wrote pick your top of part node.what exactly should i pick in source?
 
Tikito,

Please read the full thread, I asked "Does anyone know how to create a popup message that appears once on opening a CATPart"

I had a way of getting a message to appear on update, which you have done (using the method I described.

 
I did not watch memory / cpu usage ...

Code:
Sub msgOnNewPart()

Dim a As Integer
a = CATIA.Documents.Count

While True
    CATIA.Caption = CATIA.Documents.Count & "/" & a & "   :"
    If CATIA.Documents.Count > a And _
    TypeName(CATIA.Documents.Item(CATIA.Documents.Count)) = "PartDocument" Then
        MsgBox ("new CATPart")
        a = CATIA.Documents.Count
    End If
Wend

End Sub

you can run this macro at catia startup with modification in your command line

Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.
Back
Top