Jump to content


  • Content Count

  • Joined

  • Last visited

About babu_rect

  • Rank

Profile Information

  • Are you University user?

Recent Profile Visitors

819 profile views
  1. I think it works fine. Thanks for your response.
  2. How to get the last error message from the HM batch. For example, if the import file name is invalid, how to get the error message in the hmbatch?
  3. Sorry guys I was trying the API with HM and not with HW. Its working fine. How to get the last error message from the HM batch. For example, if the import file name is invalid, how to get the error message in the hmbatch?
  4. How to use the hwISession? Because in the command window if I try hwi GetSessionHandle sess, it gives the following error message invalid command name "hwi". Do I need any package for calling hwISession?
  5. Hi the Port 30000 is free one. Because I'm able to use that port with hmopengl.exe and it is being closed properly. But sill as you said, I'll try to make use of the free port. Even I tried to use vwait but I dont see the function "Server" is called at all while making the connection from the client.
  6. Hi all, I wanted to launch hypermesh as a server and my client will send various requests to the server. *********************************************************************************************************************************** SERVER CODE : HM_Server.tcl set LogFile [open C:/temp/tcl_out.txt w] proc Server {channel clientaddr clientport} { global LogFile puts $LogFile "Hello" } set chanID [socket -server Server 30000] puts $chanID *********************************************************************************************************************************** I'm launching the hmopengl.exe using ShellExecuteEx method. *********************************************************************************************************************************** CLIENT CODE //Format the command line parameter to be passed for HM in batch mode TCHAR* cmdLineParam = TEXT("-tcl C:/HM/Tcl_Scripts/HM_Server.tcl"); //Execute the hypermesh in batch mode and wait for it to complete HINSTANCE hInst = 0; SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_DEFAULT; ShExecInfo.hwnd = GetSafeHwnd(); ShExecInfo.lpVerb = TEXT("Open"); ShExecInfo.lpFile = TEXT("C:\\Program Files\\Altair\\12.0\\hm\\bin\\win64\\hmopengl.exe"); ShExecInfo.lpParameters = cmdLineParam; ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_SHOWNORMAL; ShExecInfo.hInstApp = hInst; ShellExecuteEx(&ShExecInfo); *********************************************************************************************************************************** The above code is working fine with hmopengl.exe where as it is not working with hmbatch.exe [ ShExecInfo.lpFile = TEXT("C:\\Program Files\\Altair\\12.0\\hm\\bin\\win64\\hmbatch.exe") ]; I could not find the issue...
  7. Hi tinh Thanks for your response. I'll try and let you know.
  8. I have made the HM as server and I have written a small application as client, Client will send request to the HM like loading file,hiding the assembly etc via sockets and it is working fine. I have written a function to query the xyz of the node. It is working fine as long as the node is in the model. My script has this: if{ catch[ { set nodeXYZ [hm_getentityvalue nodes $nodeID "x" 0] } errCode] } { tk_messageBox -message "Node not found" } where $nodeID contains the id of the node. If it is not there in the model I want to show my own error message but now HM shows the Application Error message which I dont want to show. How can I make not to show the Application Error messages in HM? I tired hm_blockerrormessage 1 and hm_blockmessages 1, but no use. If I use in HM command window , I'm getting the expected result [ i.,e it shows the error message "Node not found" ] But It does not work when I launch HM as server...
  9. Yes I tried it that too as well. First of all, the path does not contain any space.
  10. I created a batch file with the following command: "C:\..\..\..\hmbatch.exe" -tcl C:\..\..\commands.tcl" When I launch the bat file, it gives an error saying that "hmbatch should be launched with -c<command file> or -tcl file" I have already have -tcl option in the batch file. Can somebody tell what is going wrong?
  11. I'm writing a small program to invoke the hypermesh. I'm trying to invoke hw.exe like following: hInst = ShellExecute(NULL, //Open parameter NULL, //Name of the application TEXT("C:\\Program Files\\Altair\\12.0\\hm\\bin\\win64\\hmopengl.exe"), //Command line parameters passed to the application NULL, NULL, SW_SHOWNORMAL ); ShellExecute is used to open the given application. When I do this, I'm getting some licensing error message saying "unable to read altair_lic.dat" where as if I double click the exe it is working fine. Can somebody let me know what is the issue?
  12. Thanks Prakash. Let me try!
  13. Where can i get the complete list of command line parameters used to launch the hypermesh in batchmode?
  14. I have an external application from which I want to launch the HM and to import a tcl file in it The tcl file has set of commands ( Say importing a nastran model and exporting it to with a new name ). What is the command to do this? is its something hm.exe -tcl abc.tcl where - hm.exe is the full path of the hm - tcl is the command - abc.tcl is the name of the tcl file to be imported
  15. Thanks for your response. So you mean to say that I have to write my client in TCL and make use of the *createassem ( the HM commands ). But my client application is going to be in C++ and how to use tcl commands in it?
  • Create New...