Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Batch Analysis Catia v5 automatically with input file??

Status
Not open for further replies.

CatiaV5test

New member
Nov 4, 2005
4
Hi, I'm a bit new in Catia v5 and i'd like to know if it is possible in catia v5 to run automatically an input analysis file from dos without having to put on the run button. I've found how to start the input file but he doesn't run the analysis automatically. (!cnext -object "C:\testbatchcatia\Analysis1b.CATAnalysis")

Thanks for the help
 
Replies continue below

Recommended for you

Have you tried using the AnalysisUpdateBatch from the Batch Management?
(Start/Programs/CATIA/Tools/Batch Management)
 
Hi
Thx, but i found another way.
I've made a macro that runs it all but I don't know the script for closing CATIA. this is my script:

Sub CATMain()

Dim CATIA As Object
Set CATIA = CreateObject("CATIA.Application")
With CATIA
.Visible = False
End With

Dim documents1 As Documents
Set documents1 = CATIA.Documents

Dim analysisDocument1 As Document
Set analysisDocument1 = documents1.Open("C:\...")

Dim analysisManager1 As AnalysisManager
Set analysisManager1 = analysisDocument1.Analysis

Dim analysisModels1 As AnalysisModels
Set analysisModels1 = analysisManager1.AnalysisModels

Dim analysisModel1 As AnalysisModel
Set analysisModel1 = analysisModels1.Item(1)

Dim analysisCases1 As AnalysisCases
Set analysisCases1 = analysisModel1.AnalysisCases

Dim analysisCase1 As AnalysisCase
Set analysisCase1 = analysisCases1.Item(1)

analysisCase1.Compute

Dim analysisSets1 As AnalysisSets
Set analysisSets1 = analysisCase1.AnalysisSets

Dim analysisSet1 As AnalysisSet
Set analysisSet1 = analysisSets1.ItemByType("StaticSet")

Dim analysisImages1 As AnalysisImages
Set analysisImages1 = analysisSet1.AnalysisImages

Dim analysisImage1 As AnalysisImage
Set analysisImage1 = analysisImages1.Add("StressVonMises_Iso_Smooth", True, False, False)

Dim fileSystem1 As FileSystem
Set fileSystem1 = CATIA.FileSystem

Dim folder1 As Folder
Set folder1 = fileSystem1.GetFolder("C:\...")

analysisImage1.ExportData folder1, "ExportDataFileOplosSlat3b", "txt"

Dim analysisImage2 As AnalysisImage
Set analysisImage2 = analysisImages1.Add("Stress_Symbol_PpalTensor", True, False, False)

Dim fileSystem2 As FileSystem
Set fileSystem2 = CATIA.FileSystem

Set folder1 = fileSystem2.GetFolder("C:\...")

analysisImage2.ExportData folder1, "ExportDataFileOplosSlat3c", "txt"

Dim fileSystem3 As FileSystem
Set fileSystem3 = CATIA.FileSystem

Set folder1 = fileSystem3.GetFolder("C:\...")

Dim analysisPostManager1 As AnalysisPostManager
Set analysisPostManager1 = analysisModel1.PostManager

analysisPostManager1.AddExistingCaseForReport analysisCase1

analysisPostManager1.BuildReport folder1, "C:\...", False

Dim specsAndGeomWindow1 As Window
Set specsAndGeomWindow1 = CATIA.ActiveWindow

specsAndGeomWindow1.Close

Set analysisDocument1 = CATIA.ActiveDocument

analysisDocument1.Close

??????Catia.Close ???? this doesn't work

End Sub


Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor