Professional Documents
Culture Documents
ACT Customization Guide For Electronics Desktop
ACT Customization Guide For Electronics Desktop
ACT Customization Guide For Electronics Desktop
Desktop
ANSYS, ANSYS Workbench, AUTODYN, CFX, FLUENT and any and all ANSYS, Inc. brand, product, service and feature
names, logos and slogans are registered trademarks or trademarks of ANSYS, Inc. or its subsidiaries located in the
United States or other countries. ICEM CFD is a trademark used by ANSYS, Inc. under license. CFX is a trademark
of Sony Corporation in Japan. All other brand, product, service and feature names or trademarks are the property
of their respective owners. FLEXlm and FLEXnet are trademarks of Flexera Software LLC.
Disclaimer Notice
THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFID-
ENTIAL AND PROPRIETARY PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS. The software products
and documentation are furnished by ANSYS, Inc., its subsidiaries, or affiliates under a software license agreement
that contains provisions concerning non-disclosure, copying, length and nature of use, compliance with exporting
laws, warranties, disclaimers, limitations of liability, and remedies, and other provisions. The software products
and documentation may be used, disclosed, transferred, or copied only in accordance with the terms and conditions
of that software license agreement.
ANSYS, Inc. and ANSYS Europe, Ltd. are UL registered ISO 9001: 2015 companies.
For U.S. Government users, except as specifically granted by the ANSYS, Inc. software license agreement, the use,
duplication, or disclosure by the United States Government is subject to restrictions stated in the ANSYS, Inc.
software license agreement and FAR 12.212 (for non-DOD licenses).
Third-Party Software
See the legal information in the product help files for the complete Legal Notice for ANSYS proprietary software
and third-party software. If you are unable to access the Legal Notice, contact ANSYS, Inc.
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. iii
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
iv of ANSYS, Inc. and its subsidiaries and affiliates.
Introduction
This guide assumes that you are familiar with the general ACT usage information in the ACT Developer's
Guide. This first section supplies ACT usage information specific to Electronics Desktop:
ACT Start Page and Tool Access
Extension Installation and Loading
While Electronics Desktop does not currently support using ACT to create custom features, it does
support target product wizards. The subsequent section (p. 3) describes how you create target product
wizards for Electronics Desktop.
Note:
For information on all ACT API changes and known issues and limitations that may affect
your existing ACT extensions, see Migration Notes and Known Issues and Limitations in
the ANSYS ACT Developer's Guide.
The ACT Start Page for a stand-alone instance of Electronics Desktop has an icon for accessing the
Extension Manager. However, when Electronics Desktop is opened within Workbench, the ACT Start
Page accessed in this way does not have the icon. This is because you must manage extensions from
the ACT Start Page for Workbench.
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 1
Introduction
Once accessed, the ACT Start Page and ACT tools are all used as described in the ANSYS ACT Developer's
Guide.
• ...\AnsysEM\v201\ACT\win64\syslib\ACT
• Any of the additional folders specified by using the gear icon on the graphic-based Extension Manager ac-
cessed from the ACT Start Page
From the ACT Start Page for the stand-alone instance of Electronics Desktop, you then access the Ex-
tension Manager to load the extension and the Wizards launcher to start the wizard.
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
2 of ANSYS, Inc. and its subsidiaries and affiliates.
Electronics Desktop Wizards
You can use ACT to create target product wizards for Electronics Desktop. The supplied extension
WizardDemo includes a target product wizard for Electronics Desktop named Wizard Demo. This
two-step wizard creates two geometries from three dimension properties and the addition of two
boundary conditions:
Electronics Desktop Wizard Definition
Electronics Desktop Function Definition
Electronics Desktop Wizard Review
Note:
You use the Extension Manager to install and load extensions and the Wizards launcher to
start a target product wizard.
Tip:
Included in the supplied package ACT Wizard Templates is the extension Template-
ElectronicsDesktopWizard. It includes a target product wizard for Electronics Desktop
that displays a list of available projects or designs and creates a cube. For download inform-
ation, see Extension and Template Examples.
<interface context="ElectronicsDesktop">
<images>images</images>
</interface>
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Electronics Desktop Wizards
<callbacks>
<onupdate>OnUpdate1</onupdate>
<onreset>OnReset1</onreset>
</callbacks>
</step>
<callbacks>
<onupdate>OnUpdate2</onupdate>
</callbacks>
</step>
</wizard>
</extension>
Step Definition
The element <step> defines a step in the wizard. This wizard has two steps: Step1 and Step2.
• In the first step, the first two dimensions define and create a rectangle. The first rectangle is then auto-
matically duplicated and set at an offset along the Y axis, which is defined by the third dimension.
oDesign = None
oProject = None
def OnUpdate1(step):
global oDesign, oProject
oProject = oDesktop.NewProject()
oProject.InsertDesign("HFSS", "HFSSDesign1", "DrivenModal", "")
oDesign = oProject.SetActiveDesign("HFSSDesign1")
oEditor = oDesign.SetActiveEditor("3D Modeler")
width = step.Properties["dim/width"].Value
height = step.Properties["dim/height"].Value
offset = step.Properties["offset/offset"].Value
oEditor.CreateRectangle(
[
"NAME:RectangleParameters",
"IsCovered:=" , True,
"XStart:=" , "0mm",
"YStart:=" , "0mm",
"ZStart:=" , "0mm",
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
4 of ANSYS, Inc. and its subsidiaries and affiliates.
Electronics Desktop Function Definition
"Width:=" , str(width)+"mm",
"Height:=" , str(height)+"mm",
"WhichAxis:=" , "Z"
],
[
"NAME:Attributes",
"Name:=" , "Rectangle1",
"Flags:=" , "",
"Color:=" , "(128 255 255)",
"Transparency:=" , 0.800000011920929,
"PartCoordinateSystem:=", "Global",
"UDMId:=" , "",
"MaterialValue:=" , "\"vacuum\"",
"SolveInside:=" , True
])
oEditor.DuplicateAlongLine(
[
"NAME:Selections",
"Selections:=" , "Rectangle1",
"NewPartsModelFlag:=" , "Model"
],
[
"NAME:DuplicateToAlongLineParameters",
"CreateNewObjects:=" , True,
"XComponent:=" , "0mm",
"YComponent:=" , str(height+offset)+"mm",
"ZComponent:=" , "0mm",
"NumClones:=" , "2"
],
[
"NAME:Options",
"DuplicateAssignments:=", False
])
def OnReset1(step):
global oProject
oDesktop.CloseProject(oProject.GetName())
def OnUpdate2(step):
global oDesign
oModule = oDesign.GetModule("BoundarySetup")
width = step.PreviousStep.Properties["dim/width"].Value
height = step.PreviousStep.Properties["dim/height"].Value
offset = step.PreviousStep.Properties["offset/offset"].Value
resistance = step.Properties["bc/resistance"].Value
reactance = step.Properties["bc/reactance"].Value
oModule.AssignPerfectE(
[
"NAME:PerfE1",
"Objects:=" , ["Rectangle1_1","Rectangle1"],
"InfGroundPlane:=" , False
])
oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.CreateRectangle(
[
"NAME:RectangleParameters",
"IsCovered:=" , True,
"XStart:=" , "0mm",
"YStart:=" , str(height)+"mm",
"ZStart:=" , "0mm",
"Width:=" , str(width)+"mm",
"Height:=" , str(offset)+"mm",
"WhichAxis:=" , "Z"
],
[
"NAME:Attributes",
"Name:=" , "Rectangle2",
"Flags:=" , "",
"Color:=" , "(128 255 255)",
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Electronics Desktop Wizards
"Transparency:=" , 0.800000011920929,
"PartCoordinateSystem:=", "Global",
"UDMId:=" , "",
"MaterialValue:=" , "\"vacuum\"",
"SolveInside:=" , True
])
oModule.AssignLumpedPort(
[
"NAME:1",
"Objects:=" , ["Rectangle2"],
"RenormalizeAllTerminals:=", True,
"DoDeembed:=" , False,
[
"NAME:Modes",
[
"NAME:Mode1",
"ModeNum:=" , 1,
"UseIntLine:=" , True,
[
"NAME:IntLine",
"Start:=" , [str(width/2.)+"mm",str(height)+"mm","0mm"],
"End:=" , [str(width/2.)+"mm",str(height+offset)+"mm","0mm"]
],
"AlignmentGroup:=" , 0,
"CharImp:=" , "Zpi",
"RenormImp:=" , "50ohm"
]
],
"ShowReporterFilter:=" , False,
"ReporterFilter:=" , [True],
"FullResistance:=" , str(resistance)+"ohm",
"FullReactance:=" , str(reactance)+"ohm"
])
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
6 of ANSYS, Inc. and its subsidiaries and affiliates.
Electronics Desktop Wizard Review
In this step:
– The first property group Dimensions includes the properties Width and Height for creating the first
rectangle.
– The second property group Offset for duplication, includes the property Offset for duplicating
the first rectangle.
– The callback <onupdate> invokes the function OnUpdate1 when Next is clicked. This function creates
the new project, creates the first rectangle based on the entered dimensions, and then creates the second
rectangle via duplication and offset according to the entered offset value.
– The callback <onreset> is invoked when Back is clicked in step 2. This button is enabled only if the
callback <onreset> has been defined.
The next step is Setup, which defines and applies the boundary conditions.
In this step:
• The property group for boundary conditions defines two properties: Full Resistance and Full Re-
actance.
• The callback <onupdate> invokes the function OnUpdate2 when Next is clicked. This function applies
the boundary conditions to both rectangles.
Once the wizard has completed, the boundary conditions can be viewed in Electronics Desktop by se-
lecting them in the Project Manager tree.
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 7
Electronics Desktop Wizards
Release 2020 R1 - © ANSYS, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.