-
-
November 15, 2023 at 7:32 pmlongt8Subscriber
Hello,
I am considering using script to read and write in .k file into LS-PrePost. I am going to put the script in .bat file and call the function by just clicking it. Would you let me know the sentcence and the website where I can find the instruction? Thank you!
Teng
-
November 16, 2023 at 5:20 pmigandikoAnsys Employee
You can use LSPP command file to run LSPP process in batch mode without launching GUI. First try import and export using GUI. The commands will be saved to lspost.cfile. You can rename this file and call LSPP using below command to run this process without GUI.
C:\path\lsprepost410.exe runc=name.cfile
Please see here (https://lsdyna.ansys.com/knowledge-base/ls-prepost/) for some resources on LSPP.
-
November 17, 2023 at 6:48 pmlongt8Subscriber
Hello Imtiaz
I followed your procedure, but after I clicked my ".bat" file, it just flush one time and my ls prepost is not opened to import the ".k" file.
This is what I put in my ".bat" file:
C:\Program Files\LSTC\LS-PrePost 4.10\lsprepost4.10_x64.exe runc=Import.cfile
This is what I got in my ".cfile" file:
open command "C:\.........\Import.cfile"
Import.cfile is at the same directory with the ".bat" file.
Would you let me know is the problem?
Thank you so much.
Best,
Teng
-
November 17, 2023 at 7:06 pmigandikoAnsys Employee
What is your goal in using this .bat file? You said you want to read in .k into LSPP. Does this mean you want the bat file to launch LSPP and open a k file using GUI? The command to launch LSPP and open a k file is simply,
C:\Program Files\LSTC\LS-PrePost 4.10\lsprepost4.10_x64.exe input.k
You also said you want the bat file to read and then write a k file. What is being changed when you write this k file? Those changes should be defined in LSPP command file (.cfile). For example, below sample test.cfile will open input.k, translate part 4 by 10 in negative x direction, and then save the file as input_mod.k. The batch command to run this process without GUI access is,
"C:\Program Files\LSTC\LS-PrePost 4.10\lsprepost4.10_x64.exe" runc=test.cfile
Note that path is defined in quotes due to spaces in the path. The contents of test.cfile are
$-------------------------------------------------------
openc keyword "input.k"
genselect node add part 4/0
translate_model -10 -0 -0
translate_model accept 0 1001001 1001001
transform_model done
save keywordabsolute 0
save keywordbylongfmt 0
save keywordbyi10fmt 0
save outversion 12
save keyword "input_mod.k"$-------------------------------------------------------
-
-
January 30, 2024 at 7:12 pmlongt8Subscriber
Hello Imtiaz,
I want to automate this process for make it easer for me. Wouldyou let me know how make sure the the LSPP an input and ouput the .k file without error? For some cases, the file has errors but the LSPP still can input or output it. How can I get those information undet the bath mode?
Thank you so much.
Best,
Teng
-
- The topic ‘Commend to import and export .k file in LS-PrePost’ is closed to new replies.
- LS-DYNA Installation Issues with Student Workbench 2024 R2
- LS-Dyna CESE SMP d vs MPP d solver
- CESE solver – Ignition mechanism
- Cross-coupled stiffness elements in LS-DYNA
- About combine different unconnected body into one part
- Mathematical model generation stuck at 10%
- CONTROL_REFERENCE_CONFIGURATION
- Tiebreak using Segment set for contact b/w 20 noded Hexahedral elements
- shape memory alloy material in LS-DYNA
- CESE combustion model
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.