Batch STL import, save as .prt

Hi! I'm brand new to journaling. I'm just starting to read through some of the tutorials here so sorry if this is a super easy question to answer.

I have a folder of STL files that I would like to convert to .prt files. I'd like for the .prt files to have the same name as they originally had as the STL file, and for it to save to the same location that the STL file is in (or, in new folder with "_PRT" appended to the original name of the folder). I would also like to perform some operations on the files before saving them such as changing the color, transparency, and fitting it to the screen.

I found this:
http://www.nxjournaling.com/content/process-files-directory

Which seems very useful and very much like what I am trying to do. Any tips on modifying this code to do what I am trying to do?

Thanks!

Well, I played with the process directory file and now I have a journal that will take a folder filled with .prt files and make the changes that I want to make to each file and save and close each file. Progress! My code is pretty brute force though. It's not very pretty. I think I'm going to do what you recommended and try to pick up a book from the library about visual basic.

I'm having trouble with figuring out how to modify the folder and file names.

Other silly stuff that I'm not sure about:
I looked around a lot on the web and on this site and still haven't been able to find the help file.
Is there a free or easy way to be able to look at the code with the different functions being highlighted? I pulled it up in word but its all black. My work might have some software I can get access to, but I don't know what I'm looking for.

jamie hudson

When you install the NX help files, the "programming help files" are no longer installed by default; you may need to run the installer again, making sure to check all the right options. If you have a "Siemens community" login, you can view the programming help files online here (NX10 version):
https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_api/#uid:index

I would suggest that you get an integrated development environment (IDE) to write code. Some suggestions can be found on the resources page:
http://nxjournaling.com/content/resources

One update to my comments in the IDE section on that page: I'm currently using Visual Studio 2015 community edition (the free one) to write journal code for NX 9 with no issues. If you have an author license and will be compiling your code to .dll or .exe files, check the NX release notes for the recommended version of VS to use with your version of NX.

There is some code here:
http://nxjournaling.com/content/write-text-file
where the main intent is to show how to write information to a text file, but also shows some commands to extract information from the file name. These commands may be of use to you.

Thank you so much for the information! I'm hopeful to be able to figure this out and learn a new skill.

jamie hudson