CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS

Automatically starting a Journal File whenever workbench opens

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2015, 08:45
Unhappy Automatically starting a Journal File whenever workbench opens
Join Date: Oct 2014
Posts: 44
Rep Power: 10
kar.coep is on a distinguished road
Hello,I am trying to open and drive workbench from excel. Currently I have programmed workbench to launch directly from excel (by creating a .wbpj object in excel and using selection.verb command). Is there a command in excel or in workbench that detects the workbench open event and starts the journal file at specific path automatically? Also, how to record design modeler steps for jscript? These steps would include importing a geometry from creo, creating named selection and changing parameter values.Thanks in advance.
kar.coep is offline   Reply With Quote

Old   August 12, 2015, 22:07
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 12
Kapi is on a distinguished road
Hi kar.coep

You can run .wbjn file when Workbench is opening by creating a .bat file
"C:\Program Files\ANSYS Inc\v150\Framework\bin\Win64\RunWB2.exe" -I -R try_file.wbjn
inside this .wbjn ( workbench journal file) you can write code to run your Jscript, something like this,

# encoding: utf-8
template1 = GetTemplate(TemplateName="Mesh")
system1 = template1.CreateSystem()
geometry1 = system1.GetContainer(ComponentName="Geometry")
script = open('my_geom.js', 'r')
Similarly you can add your mesh jscript file as well and run one after another.

how to record design modeler steps for jscript?
it is not possible to record design modeler steps, you have to create your coordinate file and give it extension of .js and run with above code.

Hope it helps

Kapi is offline   Reply With Quote


deign modeler, excel, journal, jscript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24

All times are GMT -4. The time now is 07:28.