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.
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.
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 |
|
|||||||||||||||
| 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" ]) |