CreateComponent2_0
This command is used create the 2.0 component, which entails creating the first representation and assigning security to the entire component (as opposed to encrypting the individual representation).
Note that this topic includes two examples of how to use the CreateComponent2_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 CreateComponent2_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 Create Component 2.0 | ||||||||||||
| Parameters |
|
||||||||||||
| Return Value |
None |
| Python Syntax | CreateComponent2_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.CreateComponent2_0( [ "NAME:ComponentData", [ "NAME:ComponentHeaderInfoData", "ComponentName:=" , "Filter1", "Company:=" , "", "CompanyURL:=" , "", "ModelNumber:=" , "", "Version:=" , "1.0", "Notes:=" , "", "OwnerName:=" , "username", "OwnerEmail:=" , "user.name@company.com", "Date:=" , "9:12:32 AM Nov 17, 2025" ], [ "NAME:ComponentSecurityData", "IsEditAllowed:=" , True, "NewEditPassword:=" , "111111" ] ], [ "NAME:CreateRepresentationsData", [ "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:=" , "9:12:35 AM Oct 27, 2025", "HasLabel:=" , False, "IsEncrypted:=" , True, "AllowEdit:=" , True, "SecurityMessage:=" , "", "Password:=" , "", "EditPassword:=" , "111111", "PasswordType:=" , "InternalPassword", "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:RepresentationData", [ "NAME:HeaderAndGeometryData", "SourceDesignName:=" , "Waveguide_Filter:filter", "RepresentationName:=" , "filter", "Company:=" , "", "Company URL:=" , "", "Model Number:=" , "", "Help URL:=" , "", "Version:=" , "1.0", "Notes:=" , "", "IconType:=" , "", "Owner:=" , "username", "Email:=" , "user.name@company.com", "Date:=" , "9:12:31 AM Oct 27, 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:=" , ["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:=" , "" ] ] ], "D:/Designs/AAProjects/ComponentCmd/test.acmp2")
|
| Python Example |
The example below is a simplified version of the CreateCommand2_0 command; it only includes the necessary functions, but users can add other functions (as shown above) as desired. oDesktop.CreateComponent2_0( [ "NAME:ComponentData", [ "NAME:ComponentHeaderInfoData", "ComponentName:=" , "Test1", "Company:=" , "", "CompanyURL:=" , "", "ModelNumber:=" , "", "Version:=" , "1.0", "Notes:=" , "", "OwnerName:=" , "username", "OwnerEmail:=" , "user.name@company.com", "Date:=" , "9:12:32 AM Oct 27, 2025" ], [ "NAME:ComponentSecurityData", "IsEditAllowed:=" , True, "NewEditPassword:=" , "111111" ] ], [ "NAME:CreateRepresentationsData", [ "NAME:RepresentationData", [ "NAME:HeaderAndGeometryData", "SourceDesignName:=" , "Waveguide_Filter:IcepakDesign1", "RepresentationName:=" , "IcepakDesign1", "IsEncrypted:=" , True, "PasswordType:=" , "InternalPassword", "VisibleParts:=" , ["wg_flange_in"], ] ], [ "NAME:RepresentationData", [ "NAME:HeaderAndGeometryData", "SourceDesignName:=" , "Waveguide_Filter:filter", "RepresentationName:=" , "filter", ] ] ], "D:/Designs/ComponentCmd/test2.acmp2") |