Macro for Changing a Design Variant

Double-clicking a design variant calls a macro specified as follows:

<FMVInfo MacroHicPath ="c"

MacroAddPath ="Bsp\Designvarianten"

MacroFileName ="Func_ModifyVariant.Mac"

MacroOsPath ="m:\Daten\Ztl\Bsp\

Designvarianten"/>

These entries can, of course, be combined with 'FeatName'.

The following macro changes the data of a variant:

 

Note the active part,

to be able to update it at the end.

 

 

Object for a variant feature

Initialisation with the variant feature from the last double click.

You can also initialise the feature using a part and a feature ID: FUNC varFeat.Init(activePart, %id)

 

Object for the parameter variables of the variant

Get parameter variables of the variant

Change value of a variable.

Write parameter variables back

At this point, no data has been changed in HiCAD. Copies of the original data are used

Transfer of the data to the HiCAD data

Without the following update, you will now see, in the feature log, an * on the variant feature and the new data in the feature, as for changes without automatic recalculation.

 

Recalculating the part with the new data

 

 

 

The data in the FMV file are XML files. This means that the double quotation marks must not contain any arbitrary characters. In particular, they must not contain umlauts or '<'resp. '>'. There are replacement codes for these characters.

Design Variants