Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL/NX Journal from Batch commands 1

Status
Not open for further replies.

Frank2288

Mechanical
Nov 20, 2015
38
0
0
IT
Hi all! I need to launch a DLL that i wrote from batch.

I found something on multiple forums and on nxjournaling.com, but not quite the information that i need. I have a few questions:

The best thing would be to launch a DLL (simuling the CTRL+U command within NX) that could interact with a part already open in NX. Also a journal file would be sufficient. I saw that there is the run_journal.exe line to launch a journal file, but I can't manage to interact with an existing session of NX (with an open part). Is it possible? Does it exist something similar to launch directly a DLL?

Thanks a lot

Francesco
 
Replies continue below

Recommended for you

Can you explain more of what you want to do?
If you want to work on a part open in the session, the session should start the program.
Generally, a program run in batch starts its own process and has no UI access.

The only way I can imagine a program communicating with an already open NX session is to use ugs_router.

Mark Rief
NX CAM Customer Success
Siemens PLM Software
 
Thank you for your answer, i will look into ugs_router.

I'll try to explain everything better with an example. I'd like to open a part (let's say that contains a cylinder) and, leaving the same first session open, launch a series of journals/dll interacting with the cylinder. For example, I could have one journal that evaluate the volume of the cylinder, and another one that modify its dimensions. Then i could like to know again the volume once that the second DLL is finished, and so launch the first dll again and so on.

In other words: is there a way to interact by batch commands with an open session of NX (the one containing the cylinder in this example) such that a third party software (e.g. Matlab) could control the whole process via batch, launching the DLLs/journal files following an algorithm?

p.s. you could ask me why you don't create the control algorithm in NXopen, but I have lots of tools (especially optimization tools) already built and ready in Matlab, so i'd like to let Matlab control everything.

Thanks
 
I'm 95% sure that what you are describing is called "remoting"; this allows your program to interact with an open NX session. You can find some example code in your {NX install}\UGOPEN\SampleNXOpenApplications\{.NET | Java} directory.

www.nxjournaling.com
 
Yes, you are absolutely right. I was looking into that, but I would have liked to know if there was a way to do that via batch. Anyway, i guess i'll use a remote server.
 
I'm not sure what you mean by "do that via batch". If you use remoting, your program essentially has full control of the NX session. You could start your program from a batch file if you want; what am I missing?

www.nxjournaling.com
 
Well, the way I see it, you have the same results, once that the method is working. But i thought that doing the "full control" by command line (windows cmd) was simpler for me than start a server/remoting connection.

I don't know much about programming, so maybe I am wrong or I missed something.

Thanks again anyway.
 
Status
Not open for further replies.
Back
Top