Showing results for 
Search instead for 
Do you mean 
Reply

Journal writing, what does it take

Recently I've been asking question on how to accomplish certain tasks with NX, and the answer has been, "a journal could do that".  Well, journals are one area I have not gotten into with NX, so what does it take to create journals?  I've recorded "macros" in the past, but that's it.

 

A quick look didn't show me any "Journal writing for dummies" training.  Would it be more beneficial to have a background in code writing, vs. NX?  We have some code people, with no NX experience, and myself with a lot of NX experience...I suspect the ideal candidate would be in the middle?

-Dave
NX 11 | Teamcenter 11 | Windows 8.1
8 REPLIES

Re: Journal writing, what does it take

Journals can be recorded in any supported language, but only certain ones can be played back (I think VB, VC# and Python?).

 

See the links in the other threads for the GTAC "getting started in NXopen programming" and look at the SNAP guide.

 

You probably can pick up the programming yourself - in your spare yoctoseconds of free time, try going thru a "Visual Basic for dummies" type of book, or see if a local community college has an "intro to VB" type of class.  Then if you run into trouble you can ask the programmers for help.

 

You can record journals in NX, so (if what you want to do is covered, which is ALMOST everything by now), that gets you a starting point.

Another source of examples if the Solutions database (https://solutions.industrysoftware.automation.siemens.com/adv_search.php) - after doing a search (e.g. "create block"), filter on "nx_api" document type to see just the API examples. You can include the language of choice in the search (e.g. "basic" or "python")

 

If you get into this, I would suggest seeing if your "real programmers" use any kind of source code control (CVS, SVN, Sourcesafe, etc.) so you have some sort of revision control & version tracking of your code.

 

Have fun!

And just remember, you can do almost anything with a simple GRIP program journal

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Journal writing, what does it take

Thanks Ken. NX Open, Journal...seems like they are all basically the same.

fyi, this is one of the issues:
http://community.plm.automation.siemens.com/t5/NX-Design-Forum/Points-and-vectors/m-p/340976#U340976

-Dave
NX 11 | Teamcenter 11 | Windows 8.1

Re: Journal writing, what does it take

Dave,

I would start by recording a journal and playing it back. This writes vb code, which can be the starting point of a program. Take a look at my Tech Tip on Using Journals in CAM. Ignoring that this is for CAM, it shows how to start with a recorded journal, and then by using  a text editor and some samples, gradually change it in to a flexible program.

This is the approach I would take to start with. As your needs increase, at some point you can get help from a "real" programmer - there are plent of folks that know vb for example. 

Mark Rief
Retired Siemens

Re: Journal writing, what does it take

> NX Open, Journal...seems like they are all basically the same.

 

They are all related, certainly.

 

Basically, you automate things in NX by writing programs in standard programming languages. Everyone has their own favorite language, but the most popular one for NX programming is VB (Visual Basic). So, you're going to write some VB code. Most code does it's work by calling functions that live in libraries provided by soemone else (i.e. not you). So, what libraries are available, and how are they useful? One useful set of libaries is the .NET Framework, provided by Microsoft. It's already on your computer (almost certainly) and it does lots of useful things, like reading and writing files, for example. For NX-specific stuff, the big powerful library is NX/Open. It has tens of thousands of functions that you can call to do useful things with NX models. If you're a newbie, a smaller and simpler library that might well do what you want is SNAP. You can mix calls to these library functions however you want -- your VB code can call NX/Open functions, SNAP functions, and .NET Framework functions in whatever combination you choose.

 

OK, so what is "journaling"? Well, it's a way to record interactive NX steps in the form of VB code. So, it's a way to "write" VB code without actually doing all the typing. The recorded code is typically very verbose, but sometimes it' s a useful starting point. People call the recorded/modified code a "journal", but it's simply a VB program. Nothing more, nothing less. In the particular case you mentioned, (exporting points/vectors) a recorded journal probably won't help you very much.

 

So, how to get started? I think the best way is to work through the first 3 or 4 chapters of the "Getting Started with SNAP" guide. You can do this even without a SNAP license. It even teaches you the basics of the VB language. Once you have done this, you'll understand the basic ideas and you'll be in a better position to start using NX/Open functions.

山田
yamada

Re: Journal writing, what does it take

A good help could be the tutorial section on cowkis website:
http://nxjournaling.com/content/tutorials

Re: Journal writing, what does it take

As a suggestion...

 

Someone could collect all the suggestions in this and the other thread, and post as a "getting started" guide, and "pin" that thread to the top of this forum?

 

That way first time users would see it right away, and not post (yet another) similar thread?

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Journal writing, what does it take

Would this be a good class to send one of our code writers?  they have minimal NX experience, but a lot of code writting.

 

http://training.plm.automation.siemens.com/courses/iltdescription.cfm?pID=TR13110_______NX___10.0___...

-Dave
NX 11 | Teamcenter 11 | Windows 8.1

Re: Journal writing, what does it take

It sounds reasonable.

Make sure they already have good working knowledge of VB (or whatever programming language) so they're not trying to learn the language while they're learning the NX API.

Also, it would be best if they are a (reasonably) experienced NX user (again, so they're not trying to figure out what they're trying to do in NX)

 

But any course only goes so far.  Where you REALLY learn the NX API is by hammering thru writing applications.  And (once you get past "trivial" applications) that's just a "beat on it until you learn how to do it" sort of thing.

You can get a lot of good ideas here, and in the "Solutions" database, and examples in the \UGOPEN\SampleNXOpenApplications\ folder tree, and recording journals, and a few other places.

But you typically have to adapt them to what you need.

 

And always remember...

Good programmers write good code.  Great programmers steal good code

 

Ken

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled