
Welcome message.
Introducing Frederik Vanhee a.k.a theScriptingEngineer.
An overview on how this course is structured.
Automation is not the only reason, and might not even be the most important one.
#whyClickIfYouCanScript
In this lecture we will install .NET framework, Visual Studio Code and create the boiler plate code so we can run our first "Hello world" application.
A series of slides with background information and useful references.
The first step in journaling: how to record and play a journal.
The structure of a typical recorded journal and explanation of the code we obtain.
Record a journal while creating a mesh collector. This will be the basis for the rest of the section.
Modifying the recorded journal to create multiple mesh collectors.
Improve the code for mesh collector. Handle material for all cases and set the color of the collector.
Record and edit a journal to create a nodal force. This approach can be used for any type of force. In a later section we will see how we can pass objects which don't have a name or label.
Introducing idempotency.
Overload the method so you can call it with other inputs.
Record and edit a journal to create a constraint. This approach can be used for any type of constraint.
Record and edit a journal to create a solution in the sim file.
Edit the code to handle non-existing ouput requests.
Create subcases in the solutions.
Writing code to add the loads and the boundary conditions from the previous section to the subcases in this section.
An extra on solver sets in NXOpen.
Record and edit a journal for results combinations. Introducing the PostInput class to pass information to the method.
The code to loads results and also how to handle already loaded results.
Learn the difference between Solutions, SimResultReferences and SolutionResult objects and how they relate.
Move the code code for ResultTypes in a separate method.
Delete and re-create companion results to mimic idempotency.
Write the code for passing identifiers (from the PostInputClass) and handling errors during execution.
Adding user feedback and user input checks. This will avoid a lot of questions you might otherwise receive.
Write the code for exporting a single result to a universal file. Can be used to interface with other commercial or in-house software.
Note that the model is the same as used in section5.
Handling units in exporting results in NXOpen.
Some things to know about results in companion results and imported results. Be very carefull when using the non default results with universal files in SimCenter.
Write the code to create a results envelope. Reusing most of the methods from the previous sections.
Note that the model in the resources is the same as used in section5.
Create a separate method for ResultParameters object, which is also used in displaying results.
Update the deprecated code from NX12 to the latest version. Showing that the NXOpen API's are very stable. (eg. even though the code is deprecated, it still works in SC2022.1.
Learn how to pass arguments to a script via the GUI and use them in the code to open a file for example.
Learn how to create simple NX forms with the NX look and feel.
Learn how you can create a file selector using windows forms and also create custom forms (which is not advised).
Learn how I use CAE groups to pass objects to a journal through a string.
Learn how to display information through NXOpen to the status bar. Plus a fun example.
Learn how to run journals from the command line and an example of generating the project specific code using a spreadsheet.
Learn how to run your journal form the command line.
Learn how to run several journals sequentially using a cmd file.
Learn how to generate project specific code using a spreadsheet.
Learn how to handle CAE assemblies in this section.
Learn how parts are organized in an assembly.
Learn how components are organized in an assembly.
Learn about FEModelOccurrences and their relation to components.
SimCenter has a powerfull feature called NXOpen. It is a set of API's which you can use create your own programs or journals as they are called.
In this course you will learn how you can use NXOpen to create your own programs. You don't need any NXOpen experience as we take it from the beginning, but even people with NXOpen experience will benefit from this course. We start by setting up the development environment using Visual Studio Code. I have chose VS Code because it is free, it is popular so a lot of extensions and tutorials exist and (for people in a corporate environment) it can be installed without having admin privileges.
During this course we will create a fully automatic analysis which runs from the command line, step by step. We will use a structural analysis as an example, but the concepts are also applicable to other analysis types. We start by creating loads and boundary conditions followed by solutions and subcases, after which we post-process the results. We will see how we can pass information to the journals without user interaction, before bringing it all together in a single run from the command line. There we will also see how to solve the solutions.
Towards the end of the course there is an additional section on how to handle assemblies and a few example programs. We finish the course with a section on how to easily access and share you programs.
This course is in C#, but even if you are using vb.net or Python you will be able to apply the code and concepts from this course.