Decompiler
Goal
Generates Companion for Delivery Excel, CSV or XML files from any STEPXML file:
From local file
Decompile from file can be launched with the following maven command:
mvn c4d:decompile -Dinput=<STEPXML file> -DoutputDirectory=<folder>
From Step
Decompile from Step can be launched with the following maven command :
mvn c4d:decompile -DexportConfiguration=<Export Configuration ID> -DoutputDirectory=<folder> -P my-env-profile
This feature is available with STEP Rest API V1 (default) and STEP Rest API V2 STEP 10.0.
TIP
See Devops -> Maven configuration -> Profile Management for profile configuration
Parameters
Mandatory parameters :
- input STEPXML (
input
eitherexportConfiguration
, only one is required) :input
path to STEPXML fileexportConfiguration
id of export configuration used to export STEPXML
outputDirectory
path to the folder where the files are decompiled
Decompiler assume multiple other parameters:
outputFormat
- Description: Used to generate only CSV or XLSX file when decompiling datamodel STEPXML file.
- Allowed values:
CSV
(default value): Files are decompiled in CSV except for those forced in XMLXLSX
: Files are decompiled in XLSX except for those forced in XMLBOTH
(deprecated) replaced byCSV_XLSX
CSV_XLSX
: Files are decompiled in CSV and XLSX except for those forced in XMLXML
: Files are decompiled in XMLSPLIT_XML
: The files are decompiled in XML and split at the highest level to make one file per element
attributeGroupBy
- Description: Used to choose how to split attributes files when decompiling STEPXML file.
- Allowed values:
None
(default value),AttributeGroup
,UserType
,BOTH
.
packageName
- Description: Used to store file in proper hierarchy and to generate file imports.
- Example:
fr.cantor.step
.
splitLov
- Description: Used to separate lists of values in multiple files.
- Allowed values:
true
(default value),false
.
addBOM
- Description: Used to add a BOM to the generated CSV files so that Excel opens the files with the correct encoding.
- Allowed values:
true
,false
(default value).
flattenByType
- Description: Used to decompile without using the hierarchy to distribute decompiled elements in different directories.
- Allowed values:
true
,false
(default value).
useTemplate
(Companion for delivery >= 5.3.0 and Companion Twirl Templates >= 4.0.0)- Description: Used to generate
.companion.xml
files that use companion twirl templates when it's possible. See Companion Twirl Templates changelog to see which ones are supported. - Allowed values:
true
,false
(default value).
- Description: Used to generate
TIP
Decompiled files are stored in directories corresponding to package name, file types and setup group hierarchy.
WARNING
CSV and Excel file need rework after generation.
Moving XML files can break imports.
Use case
Existing project recovery
From an export of all your STEP configuration, launch the Companion for Delivery decompiler to generate Companion for Delivery files.
Files can be added to a Companion for Delivery project and stored in a Version control systems.
Maintain STEP configuration
Some configuration can be maintained inside of STEP, like web-ui, and be easily decompiled to be saved in a Version control systems.
Companion for Delivery file example
Decompiling a STEPXML file allows you to have an example of a new Companion for Delivery file format.