EditComponent2_0

After creating a 2.0 component, you can use the EditComponent2_0 command to add or delete design representations, change the component's information, or change its security.

Important: A representation cannot be edited once it is committed to a component.

Note that this topic includes two examples of how to use the Edit Component2_0 command: the first example is a typical script that would be generated from the Tools > Record Script to File user interface function. The second example is a simplified version of the EditComponent2_0 command that includes only the required script functions needed to create the component; this version can aid in automation.

Note:

A recorded script does not record Component 2.0 passwords; they must be added after the script is created.

UI Access Right click on a design in the Project Manager tree and select Edit Component 2.0, then select the Component 2.0 file to edit.
Parameters
Name Type Description
<Filename> String Filepath of the Component 2.0 file to be edited; it has the .acmp2 file extension.

<ComponentData>

Array

Structured array that defines the properties of the top-level 2.0 component. It has the following parameters:

["NAME:ComponentData",

[ComponentHeaderInfoData], # Array that sets the information for the component file; see example below.

[ComponentAuthenticationData] # Needed if the 2.0 component is encrypted; see example below.

[ComponentSecurityData], # Needed if you want to change the security settings on the component file; it is an array that defines the overall security for the 2.0 component; see example below.

]

<CreateRepresentationsData>

Array

Needed if you want to add a representation to the specified 2.0 component. It is a structured array that defines the representation in the 2.0 component. There can be multiple <CreateRepresentationsData> definitions. It has the following parameters:

["NAME:CreateRepresentationsData",

["NAME:RepresentationData",

[HeaderAndGeometryData] # Array that defines the representation parameters defined on the Info, Model, Coordinate Systems, Parameters, and Encryption tabs of the Create Component 2.0 Representation window; see the example below.

[DesignData] # Array that defines parameters on the design-specific tabs; which depending on the design may be Boundaries, Excitations, Circuit Elements, Hybrid Regions, and Mesh tabs of the Create Component 2.0 Representation window; see the example below.

[ImageFile] # Optional array that defines the image to display in the upper right area of the 3D modeler whenever the representation is used. The filename is a string that includes the filepath and file name.

]

]

<DeleteRepresentationsData> Array Needed if you want to delete a representation from the specified 2.0 component. You must specify the representation name (as a string), and if the representation is password protected, you must specify the password. See the example below.
Return Value

None

 

Python Syntax EditComponent2_0(<ComponentData>, <CreateRepresentationsData>, <Filename>)
Python Example

The example below demonstrates the creation of the 2.0 component and the addition of two representations.

oDesktop.OpenProject("D:/Designs/Waveguide_Filter.aedt")

oDesktop.EditComponent2_0(

"D:/Design/AAProjects/ComponentCmd/test.acmp2",

[

"NAME:ComponentData",

[

"NAME:ComponentHeaderInfoData",

"ComponentName:=" , "Filter1",

"Company:=" , "",

"CompanyURL:=" , "",

"ModelNumber:=" , "",

"Version:=" , "1.01",

"Notes:=" , "This is test note",

"OwnerName:=" , "username",

"OwnerEmail:=" , "user.name@company.com",

"Date:=" , "9:12:32 AM Nov 18, 2025"

],

[

"NAME:ComponentAuthenticationData", # needed if the component is password protected

"ComponentEditPassword:=", "111111"

],

[

"NAME:ComponentSecurityData",# changing the password

"IsEditAllowed:=" , True,

"NewEditPassword:=" , "222222"

]

],

[

"NAME:CreateRepresentationsData", # adding a representation

[

"NAME:RepresentationData",

[

"NAME:HeaderAndGeometryData",

"SourceDesignName:=" , "Waveguide_Filter:filter",

"RepresentationName:=" , "filter22",

"Company:=" , "",

"Company URL:=" , "",

"Model Number:=" , "",

"Help URL:=" , "",

"Version:=" , "1.0",

"Notes:=" , "",

"IconType:=" , "",

"Owner:=" , "username",

"Email:=" , "user.name@company.com",

"Date:=" , "4:13:02 PM Nov 18, 2025",

"HasLabel:=" , False,

"IsEncrypted:=" , False,

"AllowEdit:=" , False,

"SecurityMessage:=" , "",

"Password:=" , "",

"EditPassword:=" , "",

"PasswordType:=" , "UnknownPassword",

"HideContents:=" , True,

"ReplaceNames:=" , True,

"ComponentOutline:=" , "None",

"IncludedParts:=" , ["wg_flange_in","wg_inner","wg_outer","wg_flange_out2224455"],

"VisibleParts:=" , [],

"IncludedCS:=" , [],

"DefaultHandle:=" , "Global",

"IncludedParameters:=" , ["fillet_radius","fillet_radius_flange","len_wg1","len_wg2","len_wg3","t1","t2","t_flange","w1","w2","w_flange","wg_height","wg_thickness","wg_width"],

"IncludedDependentParameters:=", [],

"ParameterDescription:=", [ "fillet_radius:=" , "", "fillet_radius_flange:=", "", "len_wg1:=" , "", "len_wg2:=" , "", "len_wg3:=" , "", "t1:=" , "", "t2:=" , "", "t_flange:=" , "", "w1:=" , "", "w2:=" , "", "w_flange:=" , "", "wg_height:=" , "", "wg_thickness:=" , "", "wg_width:=" , ""],

"IsLicensed:=" , False,

"LicensingDllName:=" , "",

"VendorComponentIdentifier:=", "",

"PublicKeyFile:=" , ""

],

[

"NAME:DesignData",

"Excitations:=" , ["1","2"]

],

[

"NAME:ImageFile",

"ImageFile:=" , ""

]

],

[

"NAME:RepresentationData",

[

"NAME:HeaderAndGeometryData",

"SourceDesignName:=" , "Waveguide_Filter:IcepakDesign1",

"RepresentationName:=" , "IcepakDesign1",

"Company:=" , "",

"Company URL:=" , "",

"Model Number:=" , "",

"Help URL:=" , "",

"Version:=" , "1.0",

"Notes:=" , "",

"IconType:=" , "",

"Owner:=" , "username",

"Email:=" , "user.name@company.com",

"Date:=" , "4:12:58 PM Nov 18, 2025",

"HasLabel:=" , False,

"IsEncrypted:=" , False,

"AllowEdit:=" , False,

"SecurityMessage:=" , "",

"Password:=" , "",

"EditPassword:=" , "",

"PasswordType:=" , "UnknownPassword",

"HideContents:=" , True,

"ReplaceNames:=" , True,

"ComponentOutline:=" , "None",

"IncludedParts:=" , ["wg_flange_in","wg_inner","wg_outer","wg_flange_out"],

"VisibleParts:=" , [],

"IncludedCS:=" , [],

"DefaultHandle:=" , "Global",

"IncludedParameters:=" , [],

"IncludedDependentParameters:=", [],

"ParameterDescription:=", [],

"IsLicensed:=" , False,

"LicensingDllName:=" , "",

"VendorComponentIdentifier:=", "",

"PublicKeyFile:=" , ""

],

[

"NAME:DesignData"

],

[

"NAME:ImageFile",

"ImageFile:=" , ""

]

]

],

[

"NAME:DeleteRepresentationsData", #deleting a representation

[

"NAME:DeleteRepresentationData",

"RepresentationName:=" , "filter"

],

[

"NAME:DeleteRepresentationData",

"RepresentationName:=" , "IcepakDesign1",

"RepresentationEditPassword:=", "111111" #needed if representation is password protected

]

])

Python Example

This example is a simplified version of the EditComponent2_0 command; it includes only those functions that are necessary to edit the component, but users can add other functions (as shown above) as desired.

oDesktop.EditComponent2_0(""D:/Designs/test2.acmp2",

[

"NAME:ComponentData",

[

"NAME:ComponentAuthenticationData",

"ComponentEditPassword:=", "111111"

]

],

[

"NAME:CreateRepresentationsData",

[

"NAME:RepresentationData",

[

"NAME:HeaderAndGeometryData",

"SourceDesignName:=" , "Waveguide_Filter:IcepakDesign1",

"RepresentationName:=" , "IcepakDesign2"

]

]

],

[

"NAME:DeleteRepresentationsData"

])