Jump to content

Alec Maxwell

  • Content Count

  • Joined

  • Last visited

About Alec Maxwell

  • Rank

Profile Information

  • Country
    United States
  • Are you University user?

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Livil, Thank you, I really appreciate your help. I see where my confusion was. I didn't think that iterations was the same as simulations. I had to make a slight change to the commands above, and have included them in this post in case anyone else has similar issues that I had. set lst_subcase [poIResultCtrl_handle GetSubcaseList] set lst_sim [poIResultCtrl_handle GetSimulationList [lindex $lst_subcase end]] set LastSim [expr ([llength $lst_sim] - 1)] poIResultCtrl_handle SetCurrentSimulation $LastSim Thank you again for all of your help with this!
  2. Hi Livil, Thank you for you response. I believe there may be some confusion on what I am looking for. I am loading an h3d file, which contains the displacement values from a static analysis results from one subcase. I am attempting to get the displacement results from the final optimized model. There are two sets of displacement results in the h3d file, one from iteration 0, and one from the last iteration (final optimized model). The problem with my current TCL code that extracts the displacement results is that it exports results from iteration 0, and not the last iteration. I am looking for a TCL command that can find the number of iterations within a subcase, and then can make the last subcase the current subcase. If you have any questions please let me know. Thank you again for you help it is very much appreciated.
  3. Hi, Thank you for the response, I was able to expand on the code a bit. It now searchers through a results folder and finds all h3d models, and exports the results. However it is only exporting the results from the first iteration. I have searched through the HyperWorks reference guide to try and find a command that could change the iteration to the last iteration, but couldn't not find it. Do you have any suggestions? Thanks
  4. Hello, I am attempting to open HyperView and a model and run a TCL script to extract the displacement results from the model that has been loaded. I have been able to open HyperView from HyperMesh and load the correct model, however when it attempts to run the TCL script in HyperView I get the following error message Command line Tcl script read failed. invalid command name "mpo-9999766" while executing "m$t AddSelectionSet node" invoked from within "m$t GetSelectionSetHandle s$t [m$t AddSelectionSet node]" (file "C:/Users/Alec/Desktop/DispVer_HM/results/ExportDisp.tcl" line 6) invoked from within "source "C:/Users/Alec/Desktop/DispVer_HM/results/ExportDisp.tcl"" When I run ExportDisp.tcl just in HyperView and the code works perfectly. I have searched the forums to find out why when both pieces of code are run together it does not work. I have attached both scripts and a model in case that will help anybody troubleshoot. ExportDisp.tcl is the script that is designed to be run in HyperView and extract displacement results, and RunHyperView.tcl is run from HyperMesh and used to open HyperView, load model and run ExportDisp.tcl. Thank you in advance for your help. - Alec ExportDisp.tcl RunHyperView.tcl vf1_min3_dead_s1.h3d
  5. Hi Vipin, Thanks for the reply, sorry for the delayed response. I attempted to implement the command you listed in your previous reply, but it is not recognized as a command. It is strange though because if I type this command in the Hypermesh command window it works perfectly. I think one way around this would be when I call Hypermesh from the Windows command window that it automatically loads OptiStruct as the user profile. What do you think? Thanks again for all your help and support. Alec
  6. Hi Vipin, Thank you for the reply. I am confused by your response though. Could you elaborate on what you mean by hypermesh being in the another profile, and how could I change the profile to optistruct using tcl commands? Its my understanding that these commands are modifying the hypermesh model, and I am only calling optistruct at the end of the script to run the optimization, so why would changing the profile effect if an error is produced? Thank you for your help! -Alec
  7. I am attempting to automate some of the processes that I do in Hypermesh by using some TCL scripts. Currently I have created a working TCL script that works when I run it from the Hypermesh interface. When I attempt to run this script from the windows command window I get an error and the script stops running. I have attached the script, and the igs file where the geometry is imported from. I have also included the error that I receive below. Note if you would like to run the script you will need to modify lines 2,8, and the last 4 so that the file path reflects that of your computer. Error: Data-name is not valid 0 while executing "*setvalue loadsteps id=1 STATUS=2 OS_SPCID={loadcols 1}" (file "auto1.tcl" line 117) invoked from within "source auto1.tcl" End of command file - terminating. HM exiting with code 1 Thanks in advance for your help. -Alec Drawing3.igs Auto1_V2.tcl
  8. Hi all, I am pretty new to Hypermesh and would like to understand some of the tcl commands that can modify my Hypermesh models so that I can eventually write tcl scripts that will automatically take care of some processes for me. From the documentation it says that all commands that are being executed when interacting with the Hypermesh GUI will be written to the command file, and that this is a good way to investigate and understand what is going on when a user is interacting with the Hypermesh GUI. Problem is that when I attempt to open the command file I get an error saying that the command file does not exist. So my question has two parts. One, are my interactions with the Hypermesh GUI being recorded at all, and if they are where are they being written to. Second, is there an option within Hypermesh where I can tell the program to write the commands to a TCL script that I have created. Thank you in advance for your help. - Alec Maxwell
  • Create New...