Click ok to terminate

Jim Zeleny

Click ok to terminate

R20 running on XP. This used to be an occasional joke, but is occurring pretty much every second or third time I change parts or products. I'm getting REALLY good at saving, saving, saving........

 

BEFORE I get dumped.

 

As mentioned, this used to be an "occasional" problem, but is really getting out of hand.

 

Is there some easy solution to this problem?

David Summerscales

RE: Click ok to terminate
(in response to Jim Zeleny)

Check that R20 will even run on XP, then check your graphics card & driver. It quite often is the GPU

Jim Zeleny

Click ok to terminate
(in response to David Summerscales)
I guess the thing that surprised me is that I've been running R20 on this XP laptop for 3 years and it only recently started acting up.
From my searches of the old forums, it looks like this has been a bug for many years and I was just wondering if there was a recent fix.

From: David Summerscales [mailto:[login to unmask email]
Sent: May 2, 2013 12:58 AM
To: [login to unmask email]
Subject: [catiav5forum] - RE: Click ok to terminate


Check that R20 will even run on XP, then check your graphics card & driver. It quite often is the GPU

-----End Original Message-----

Derek Critchley, .

RE: Click ok to terminate
(in response to Jim Zeleny)

We tend to restart Catia each time we load a large CATProcess, it seems as though Catia doesn't release the memory until you close it down and restart.

 

I hope this makes some sense

Aleksa Radovanovic

RE: Click ok to terminate
(in response to Jim Zeleny)

Hello,

Running CATDUA from time to time might be good idea..

It will clean a little bit your CATPart, CATProduct, CATProcess, CATAnalysis, CATDrawing, CATMaterial....

Best regards   

Roland Friedrich

RE: Click ok to terminate
(in response to Jim Zeleny)

From my experience it helps to delete the User Settings in order to restart with the default Reference Settings. Functions that stopped working properly do work again afterwards. It is also important not to mix User Settings between releases, this could also lead to a "click ok".

And maybe you know, that it is possible to save your data via macro when the button "Click OK to terminate" is already there!

Regards,
Roland

Dave Frank

RE: Click ok to terminate
(in response to Roland Friedrich)



In Reply to Roland Friedrich:

From my experience it helps to delete the User Settings in order to restart with the default Reference Settings. Functions that stopped working properly do work again afterwards. It is also important not to mix User Settings between releases, this could also lead to a "click ok".

And maybe you know, that it is possible to save your data via macro when the button "Click OK to terminate" is already there!

Regards,
Roland



REALLY!

 

Hi Roland... I expect and avalanche of intrest on a macro to recover..... can you provide some details?

Thanks

Dave 


Dave Frank  *    Bell Helicopter *  Grand Prairie Texas

Advanced Computer Aided Manufacturing Systems Engineer

COE Product Co-Chairman, Digital Numerical Control

 

Philippe Amyot

RE: Click ok to terminate
(in response to Dave Frank)

As Dave said..

I am part of the avalanche :-)

I'm interested to get more details about this miracle.

Steven Roemish

RE: Click ok to terminate
(in response to Philippe Amyot)

Yes, let's get this snow ball rolling.

I always assumed that when I get the evil "OK to Terminate" Catia is gone and I can do nothing but "Click OK". If I have a "Save All Docs in session" macro (very easy to write) Roland is saying I have some way of running it and saving my data? I suppose I could write the macro in say Excel, and run it from there, capturing the Catia process that is running and attempt to save my Catia documents that way. But again, I always assumed Catia was toast when we get this message.

SteveR in Woolley, WA

 

Oh and a nod to the original problem, as Roland said, deleting your CAT-Setting usually corrects any unwanted Catia behavior. There is no telling why sometimes your CAT-Settings get corrupt, they just do from time to time.

 

Edited By:
Steven Roemish[Janicki Industries] @ Feb 25, 2014 - 10:18 AM (America/Pacific)

Ray Anderson

Click ok to terminate
(in response to Steven Roemish)

There is no 100% guarantee, but you will be pleasantly surprised more often than not.

Best Regards,

 

Ray Anderson

Sr Applications Engineer II, Beechcraft

Philippe Amyot

RE: Click ok to terminate
(in response to Ray Anderson)

hum.. if that is possible, why does DS did't add a pop-up message right after the Click ok to termine like: Do you want to save your files before CATIA crashes?

When I was CATIA Support, I had many discussions with DS about this Click ok to terminate and they never told me that it was possible to do something with it.

I will be more that happy to have a workaround.

Philippe Amyot

Roland Friedrich

RE: Click ok to terminate
(in response to Steven Roemish)

Yes, Steve,

that's the way how to do it!

If you run your macro from outside of CATIA (e.g. from Excel, as a .NET application) and get the CATIA process via

Set CATIA = GetObject(, "CATIA.Application")

you can do whatever you need with CATIA - it's still there, answers and works!

Best regards,
Roland from Germany

Eric Neuville

RE: Click ok to terminate
(in response to Roland Friedrich)

that's smart... i'm gonna make that script ASAP and wait for the next COTT...

Many thanks for the info

Georgios Eleftheriadis

RE: Click ok to terminate
(in response to Roland Friedrich)

Hey all,

In the past I had read in a post that the message "Click OK to terminate" is a message of the Windows OS and not of CATIA. May be this is the reason why DS cannot face the problem.

Yes, Steve,

that's the way how to do it!

If you run your macro from outside of CATIA (e.g. from Excel, as a .NET application) and get the CATIA process via

Set CATIA = GetObject(, "CATIA.Application")

you can do whatever you need with CATIA - it's still there, answers and works!

Best regards,
Roland from Germany


With the GetObject command we get access to the CATIA object of the first running CATIA Session. What if more than one CATIA Sessions are running simultaneously and the crashed one is the second or third  in the row CATIA Session? How to access the second or third CATIA Object?

Best Regards

GEL

Keith Perkins

RE: Click ok to terminate
(in response to Jim Zeleny)

as others have mentioned, the first thing we do when CATIA goes wobbly is to delete CATSettings and CATDUA everything touching your current session. If it is a large product, I copy everything to a local directory and run CATDUA in batch until there are no errors.

Jim Strawn

RE: Click ok to terminate
(in response to Keith Perkins)

We have found that thee majority of COTT's  come from the Graphics Driver.  Make sure that you are using a driver that is certified for the combination of your Graphics Card and PC Model (and CATIA Release).   We use Dell's and (mostly) nVidia Cards, and have found that different Dell Models (T3500, T3600, T3610, M4600, etc) each require a different driver even with the same Graphics Card.  

While upgrading Graphics Drivers has not eliminated all COTT's, it has greatly reduced them.

Jim Strawn
IT Specialist, Lead
COE Board of Directors, Treasurer
Cessna Aircraft Company

Eric Neuville

RE: Click ok to terminate
(in response to Jim Strawn)

This is good information Jim. Thanks.

We had to go back some driver version on few computer in order to avoid some bug with 3DVia composer.

Video driver management is one more task of the job!

Steven Roemish

RE: Click ok to terminate
(in response to Eric Neuville)

Now it is OK to terminate! paste this code into an excel VBA module or use attached .xlsm file:

Option Explicit

Sub Main_SaveCatDocs()
    Dim CATIA As Object                                                     'Catia Application
    Dim CatDocs As Documents                                                'Document Collection
    Dim CatDoc As Document                                                  'Catia Document
   
    Set CATIA = CaptureCatia                                                'Go get Catia Application "Function Call"
    If CATIA Is Nothing Then GoTo endit                                     'End macro if Catia could not be found
    CATIA.DisplayFileAlerts = False                                         'Temporarily suppress Catia file alerts
    Set CatDocs = CATIA.Documents                                           'Get Catia Document Collection
    Application.StatusBar = "Saving Catia Documents...Please Wait..."       'excel status message
   
    For Each CatDoc In CatDocs                                              'Loop Thru Docs
'        Debug.Print CatDoc.Name                                             'Print current doc name to Immediate window
'        Debug.Print TypeName(CatDoc)                                        'Print current doc type to Immediate window
'-------Validate doc type, operate only on valid Catia Documents-------------
        If TypeName(CatDoc) = "ProductDocument" Or _
           TypeName(CatDoc) = "PartDocument" Or _
           TypeName(CatDoc) = "DrawingDocument" Or _
           TypeName(CatDoc) = "AnalysisDocument" Then
            CatDoc.Save                                                     'Save the current document
        End If
    Next CatDoc
    CATIA.DisplayFileAlerts = True                                          'Reset Catia file alerts
    MsgBox "Well yes it is OK to terminate." & vbNewLine _
            & "Your files have been saved!", vbOKOnly, "Disaster Averted"   'Snarky message
endit:
   Application.StatusBar = "Macro complete"                                 'excel status message
End Sub

Function CaptureCatia() As Object                                           'function for getting Catia application
    On Error Resume Next                                                    'Allow errors to be ignored
    Application.StatusBar = "Getting CATIA...Please Wait..."                'excel status message
    Set CaptureCatia = GetObject(, "CATIA.Application")                     'Get system application
'    Debug.Print Err.Number                                                  'Print Error number to Immediate window
    If Err.Number <> 0 Then                                                 'Error handler
        Err.Clear                                                           'Reset error to 0
'-------Inform the user they are out of luck---------------------------------
        MsgBox "Sorry but Catia could not be reached", vbOKOnly, _
                "Application not found"
        On Error GoTo 0                                                     'Reset error handling
        Exit Function                                                       'Bail out of function
    End If
    On Error GoTo 0                                                         'Reset error handling
End Function

 

SteveR in Woolley, WA

Attachments

  • Save-Cat-Docs-At-OK-To-Terminate.xlsm (17.7k)

Fernando Petre

RE: Click ok to terminate
(in response to Steven Roemish)

Hi,

For CATProducts maybe is better to use SaveManagent (maybe users could modify also CATParts in session without saving them till COTT...).

And maybe is better to save everything in a specific location, without overwriting what is existing (a sort of SendTo...).

I was thinking at a vb.net application which could also check the status of all CATIA files loaded in session and eventually let you manage only what files you want to save.

 

Best regards

Fernando

https://picasaweb.google.com/102257836106335725208

https://picasaweb.google.com/103462806772634246699/

Samarinder Singh

RE: Click ok to terminate
(in response to Fernando Petre)

Hi,

Nice workaround! But how do you know that doing so will not corrupt your file by writing any possibly bad information which might have caused Catia to crash in the first place?

Regards,
Samarinder Singh

Fernando Petre

RE: Click ok to terminate
(in response to Samarinder Singh)

Running a batch CATDUAV imediatly after saving could be a solution.

Best regards

Fernando

https://picasaweb.google.com/102257836106335725208

https://picasaweb.google.com/103462806772634246699/

Eric Neuville

RE: Click ok to terminate
(in response to Fernando Petre)

 

I was asked by a user yesterday to save his work with a COTT. I remember this post and decide to write the script.

I came here today to share it with you but  Steven Roemish already posted his code!

I should come here more often!!!

My script works in 2 steps, the first one list opened documents (but do not list CATFct ones) in Excel

user can chose to take action or not (save / no save)

user can give file name and path

for security script will not over write document

because save as is used and not save management, files are saved in specific order (drawing, catalog, process, analytical, product then part)

voila.

Checking with my boss if I can post my code here. stay tuned.

Balla Zoltan

RE: Click ok to terminate
(in response to Eric Neuville)

Hy, could you share your updated code? Thank you in advance.

Steven Roemish

Click ok to terminate
(in response to Balla Zoltan)
Here try the attached excel macro.
[cid:[login to unmask email]

SteveR
1822

From: Balla Zoltan [mailto:[login to unmask email]
Sent: Monday, December 04, 2017 3:55 AM
To: [login to unmask email]
Subject: [catiav5forum] - RE: Click ok to terminate


Hy, could you share your updated code? Thank you in advance.

-----End Original Message-----
Attachments

  • image001.png (236.6k)
  • Save-Cat-Docs-At-OK-To-Terminate.xlsm (34.7k)

Eric Neuville

RE: Click ok to terminate
(in response to Steven Roemish)

well this is very close to my old code. Thanks for sharing.

 

I have to explain why I decided to save document type in this order before you make some mistake. The place I used to work for is using CATIA V5 and VPM (at the time). So user had assembly from database PSN not file based Product, so in order to preserve links to the original database document I came up with this order.

saving drawing first, so link to CATPart in database stay that way...

saving product before part so used product (Electrical / Tubing) keep links with CATPart in database...

 

Also I had some feedback from users running the script twice, they complained about bad links...

 

So maybe you want to inform user about link management and script.

Balla Zoltan

RE: Click ok to terminate
(in response to Eric Neuville)

Hy everybody,

I know this is and old Topic but the COTT message is always a hot subject.

So the Problem is, that I never get the COTT message anymore. It sounds funny that I complaine about it, but instead of the COTT Message Catia is simple "locked" (in the Task manager is described as inactive), I can't save my work and the Macro (from this Topic above) doesn't work anymore. Excell gives the error Message of an OLE Objet failure.

As it is mentioned in this Thopic the COTT meassage is a Windows Message and not a Catia Message. It is somehow possible to get this message also under Windows 10? Maybe than at least the macro will work again and I could save my work.

I have this problem since we switched to the newest version of Catia (Sevice Pack 3, Build Nuber 29, Hotfix 5).

 

Any help is much appreciated

Cliff Johnson, Cliff

RE: Click ok to terminate
(in response to Balla Zoltan)

Using R27 with windows 10.

We have a ,NET program that sits in the background and activates when the COKTT message dialog is shown, offering the user a chance to save. Saving works a good chunk of the time. Sometimes not. 

The program uses WINAPI FindWindow and other WINAPI methods to detect when the dialog is displayed. 

How to ask questions 

Randy Hitzeman

RE: Click ok to terminate
(in response to Cliff Johnson, Cliff)

Which begs the question, why can't Dassault do something similar?

On this subject, note my avatar. 

Randy Hitzeman

Balla Zoltan

RE: Click ok to terminate
(in response to Cliff Johnson, Cliff)

Hy Cliff,

the macro from this Topic- that I use to save my Work- and if I understood correctly also your Solution works only when the COTT Message appears. And this is actualy my Point. By me is no Dialog Box.Catia is simply Blocked and is not possible anymore to acces it.

Samarinder Singh

RE: Click ok to terminate
(in response to Balla Zoltan)

Hi,

A few days ago I downloaded this Excel file and I was able to save my work using this code. But it only works if there's a COTT msg dialog box. In your case it seems Catia is not responding so it will not work.

Regards,
Samarinder Singh
Edited By:
Samarinder Singh[Subscriber Members] @ Jun 07, 2020 - 01:24 AM (America/Pacific)