-
Notifications
You must be signed in to change notification settings - Fork 9
Using the scripts
This procedure will show how to automatically obtain .pdf and .step production files starting from a list of desired files.
First of all, it's necessary to enable the execution of PowerShell scripts on the current PC.
- Start
Windows PowerShell ISE (x86)
with the "Run as Administrator" option. - Enable running unsigned scripts by entering:
Set-ExecutionPolicy RemoteSigned
and then confirm with the option "yes to all". This will allow running unsigned scripts that you write on your local computer and signed scripts from the Internet.
Important: this operation has to be done only once, and then Windows will remember the setting.
The scripts are in a subfolder inside cad-libraries called scripts
. Typically, the workflow starts from a list of required components whose production files (both .pdf and .step) are requested. Inside the folder there is a .txt file called input_codes.txt
.
This file must be compiled, writing the names of the required files, excluding the extension.
This file will be a piece of input information for the script.
Important: in the example above, we are considering a three-item list whose corresponding CAD files can be found in the search paths specified inside the script export_docs.ps1
, at line 93:
$folders = '\projects\icub\icub1_icub2','\projects\icub\icub3' | foreach { $root_dir + $_ }
If the files are not included in the specified search paths, this line must be CAREFULLY modified (ASK before).
- Start
Windows PowerShell ISE (x86)
(is not necessary Administrator mode) - From the toolbar:
file/open
and locate theexport_docs.ps1
.
- Click on the "play" button.
The script will run and generate an auto_trail.txt
file inside a subfolder in the output_dir
folder.
This subfolder will have a "talking" name showing its creation date, so it will be easy to identify it.
In this case, the subfolder has been created the 6th of August 2020, at 16:22 and 38 seconds.
- Open Creo and click on "Play Trail File" button
- Locate
auto_trail.txt
inside the aforementioned subfolder
- The trail file will run and inside the aforementioned subfolder will generate required .step and .pdf files.
After having produced the required documentation, it is strictly forbidden to commit the files generated in the output_dir
folder, that must be cleaned at the end of the process.