×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Batch Analysis Catia v5 automatically with input file??

Batch Analysis Catia v5 automatically with input file??

Batch Analysis Catia v5 automatically with input file??

(OP)
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

RE: Batch Analysis Catia v5 automatically with input file??

Have you tried using the AnalysisUpdateBatch from the Batch Management?
(Start/Programs/CATIA/Tools/Batch Management)

RE: Batch Analysis Catia v5 automatically with input file??

(OP)
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

RE: Batch Analysis Catia v5 automatically with input file??

(OP)
Thanks, but i've found it.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources