Please enable Javascript to view this site.

GENIUS TOOLS Model Processor

Navigation: Examples and tutorials > Model rework

Example of legacy data revision

Scroll Prev Top Next More

With GENIUS TOOLS Model Processor, you can find existing parameter values in a model and replace them with new parameter values. The existence of the parameter containing the model description is checked, and the unit system and value are revised. A report is output in a CSV file before and after the rework.

In this use case, two task lists are created to revise the data of a model in which the parameter DESCRIPTION_1_DE is not existing. Values from the legacy parameters DESCRIPTION_1 and DESCR are to be transferred and written to the parameter DESCRIPTION_1_DE. The legacy parameters are then to be deleted.

Procedure

1.Create the following task as described in the chapter structure of task lists.

First Task list: Reporting output of existing parameters

Task

Task Settings

Body area

Report Parameter Values

(Category Report)

Add all relevant DESCR parameters under Parameter Name: DESCRIPTION_1, DESCR, and DESCRIPTION_1_DE.

Resources area

Report Definition

(Category Report)

Report Name: Parameter report

File Name: e.g. %env:TEMP%\Quality.csv (temporary file)

2.Create the filter Parameter Value, see the chapter Creating filters.

Enter DESCRIPTION_1_DE as the parameter name and * as the parameter value, then click Negate.

3.Create the second task list as specified in the following table. First, create the Report Definition in the Resources area.

Second Task list: Report parameters and unit system

Task

Task Settings

Resources area

Report Definition

(Category Report)

Report Name: Before and after report. (This is required in the Body for every report task).

File Name: e.g. %env:TEMP%\BeforeAndAfterReport.csv (temporary folder)

File Format: CSV

Options: CheckInclude file name in report CheckOpen report after processing the task list

Body area

Report Model Data

(Category Report)

Report to: Before and after report

Solid: Unit System

Report Universal

(Category Report)

Description: BEFORE: Does DESCRIPTION_1_DE exist?

Report to: Before and after report

Column Title: DESCRIPTION_1_DE

Report filter: To determine whether parameter DESCRIPTION_1_DE exists, add the enhanced report filter Parameter Value. Enter DESCRIPTION_1_DE as the parameter name and * as the parameter value.

Matching Value: %DESCRIPTION_1_DE%

Mismatching Value: <Not available>

Group

(Category Group)

Description: Migrate parameters

Mode: Currently Reworking Model

Filter: Add the filter you created in step 2.

  Add Parameter

   (Category Parameter)

Description: DESCRIPTION_1_DE

Add a parameter with Plus button.

Name: DESCRIPTION_1_DE

Type: String

Designated: Check

Description: Description first line

Unit: No Unit

  Edit Parameter

   (Category Parameter)

Create an anonymous filter by clicking Create Anonymous Filter. Add a “Parameter Value” filter node to the tree and click Edit. Enter DESCR as the parameter name and specify the parameter value with an *.

Description: from DESCR if it exists

Search by: Name

Search: DESCRIPTION_1_DE

New type: String

New value: %DESCR%

  Edit Parameter

   (Category Parameter)

Create an anonymous filter by clicking Create Anonymous Filter. Add a “Parameter Value” filter node to the tree and click Edit. Enter DESCRIPTION_1 as the parameter name and specify the parameter value with an *.

Description: from DESCRIPTION_1 if it exists

Search by: Name

Search: DESCRIPTION_1_DE

New type: String

New value: %DESCRIPTION_1%

Group

(Category Group)

Description: Delete old parameters

Mode: Currently Reworking Model

Add a filter that checks whether the old parameters exist, to the filter in the Edit Parameters task.

  Delete Parameters

   (Category Parameter)

Search in: Name

Name parameter or value:

–DESCR

–DESCRIPTION_1_DE

Set Unit System

(Category Model Properties)

Description: mm-kg-sec

Type: Millimeters - Kilograms - Seconds

Conversion: Change values (1 m -> 39.37 in)

Report Universal

(Category Report)

Description: Separation column

Report to: Before and after report

Column Title: ---

Matching value: ---

Report Model Data

(Category Report)

Description: AFTER: Unit system

Report to: Before and after report

Solid: Unit System

Report Universal

(Category Report)

Description: AFTER: Does DESCRIPTION_1_DE exist?

Report to: Before and after report

Column Title: DESCRIPTION_1_DE

To determine whether parameter DESCRIPTION_1_DE exists, add the extended report filter parameter value. Enter DESCRIPTION_1_DE as the parameter name.

Matching Value: %DESCRIPTION_1_DE%

Mismatching Value: <Not available>

Testing the task lists

4.Take a model where the DESCRIPTION_1_DE parameter does not exist. Add two new parameters in Creo by clicking in the menu ribbon on the tab Tools → Parameters. Name the parameters DESCR and DESCRIPTION_1 and specify a value for each.

Parameter in Creo

Parameter in Creo

5.In the Model Processor, click the Run Immediately Play_Active button.

Report protocol

Report protocol

Result

A CSV file is generated and opened with the registered default program, e.g., Excel.

Report in Excel document

Report in Excel document

The table shows the values before revision on the left side of the dividing column and the revised values on the right side.

Created with Help & Manual 8 and styled with Premium Pack Version 4 © by EC Software