1084
ANSYS, Inc. Southpointe 2600 ANSYS Drive Canonsburg, PA 15317 [email protected] http://www.ansys.com (T) 724-746-3304 (F) 724-514-9494 June 2015 ANSYS Electromagnetics Suite 16.2 ANSYS, Inc. is certified to ISO 9001:2008. ANSYS Electronics Desktop™: Scripting Guide

ANSYS Electronics Desktop™: Scripting Guiderafaelr/inel6068/HFSS/scripting.pdf · ANSYS, Inc. Southpointe 2600 ANSYS Drive Canonsburg, PA 15317 [email protected] (T) 724-746-3304

  • Upload
    others

  • View
    289

  • Download
    6

Embed Size (px)

Citation preview

  • ANSYS, Inc.Southpointe2600 ANSYS DriveCanonsburg, PA 15317 [email protected] http://www.ansys.com (T) 724-746-3304(F) 724-514-9494

    June 2015ANSYS Electromagnetics Suite 16.2

    ANSYS, Inc. is certified to ISO9001:2008.

    ANSYS Electronics Desktop™:Scripting Guide

    mailto:[email protected]://www.ansys.com/

  • Copyright and Trademark Information© 2015 SAS IP, Inc. All rights reserved. Unauthorized use, distribution or duplication is prohibited.

    ANSYS, HFSS, HFSS-IE, and Optimetrics 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 in the United States or other countries. All other brand, product, service and feature names or trademarks are the property of their respective owners.

    Disclaimer Notice

    THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFIDENTIAL 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. is certified to ISO 9001:2008.

    U.S. Government Rights

    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, please contact ANSYS, Inc.

    Published in the U.S.A.

  • Table of Contents

    Copyright and Trademark Information . . . . . . . . . . . . . . . . 1-2

    1. Introduction to VBScriptA Sample HFSS Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3A Sample Designer Script . . . . . . . . . . . . . . . . . . . . . . . . . 1-4A Sample Q3D Extractor Script . . . . . . . . . . . . . . . . . . . . . 1-7Simple and Composite Names . . . . . . . . . . . . . . . . . . . . . 1-9VBScript Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10

    Declaring Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10Variable Naming Conventions . . . . . . . . . . . . . . . . . . . . . . 1-10Scope and Lifetime of Variables . . . . . . . . . . . . . . . . . . . . 1-10Array Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11

    VBScript Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12Operator Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12Comparison Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13

    Controlling Program Execution . . . . . . . . . . . . . . . . . . . . . 1-13Using If...Then...Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13Using Select Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14

    Looping Through Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14

    Contents-1

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    Using a For...Next Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14Using a Do Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15Repeating Statements While a Condition is True . . . . . . . 1-15Repeating a Statement Until a Condition Becomes True . 1-15

    VBScript Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15Function Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15Sub Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15

    Converting Between Data Types . . . . . . . . . . . . . . . . . . . . 1-16Including Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16Aborting Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16Interacting with a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17Recommended VBScript References . . . . . . . . . . . . . . . . 1-17

    2. ANSYS Electronics Desktop and VBScriptOverview of ANSYS Electronics Desktop Script Variables 2-2Recording a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7Stopping Script Recording . . . . . . . . . . . . . . . . . . . . . . . . . 2-7Running a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7Pausing and Resuming a Script . . . . . . . . . . . . . . . . . . . . 2-8Stopping a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9Modifying a Script for Easier Playback . . . . . . . . . . . . . . . 2-9ANSYS Electronics Desktop Scripting Conventions . . . . . 2-9

    Syntax Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10Script Command Conventions . . . . . . . . . . . . . . . . . . . . . 2-10Named Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11Setting Numerical Values . . . . . . . . . . . . . . . . . . . . . . . . . 2-13ANSYS Electronics Desktop Layout Scripts and the Active Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13Scripts and Locked Layers . . . . . . . . . . . . . . . . . . . . . . . . 2-14Event Callback Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14

    Executing a Script from Within a Script . . . . . . . . . . . . . . . 2-15Editing Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16

    Contents-2

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    3. Ansoft Application Object Script CommandsGetAppDesktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

    GetDesiredRamMBLimit(deprecated) . . . . . . . . . . . . . . . 3-2

    GetHPCLicenseType(deprecated) . . . . . . . . . . . . . . . . . . 3-2

    GetMaximumRamMBLimit (deprecated) . . . . . . . . . . . . . 3-2

    GetMPISpawnCmd(deprecated) . . . . . . . . . . . . . . . . . . . 3-2

    GetMPIVendor(deprecated) . . . . . . . . . . . . . . . . . . . . . . . 3-2

    GetNumberOfProcessors(deprecated) . . . . . . . . . . . . . . 3-2

    GetUseHPCForMP(deprecated) . . . . . . . . . . . . . . . . . . . 3-2

    SetDesiredRamMBLimit(deprecated) . . . . . . . . . . . . . . . 3-2

    SetHPCLicenseType(deprecated) . . . . . . . . . . . . . . . . . . 3-2

    SetMaximumRamMBLimit (deprecated) . . . . . . . . . . . . . 3-2

    SetMPISpawnCmd (deprecated) . . . . . . . . . . . . . . . . . . . 3-2

    SetMPIVendor (deprecated) . . . . . . . . . . . . . . . . . . . . . . 3-2

    SetNumberOfProcessors (deprecated) . . . . . . . . . . . . . . 3-2

    SetUseHPCForMP (deprecated) . . . . . . . . . . . . . . . . . . . 3-2

    4. Desktop Object Script CommandsClear Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3

    CloseAllWindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3

    CloseProject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4

    CloseProjectNoForce . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5

    Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5

    EnableAutoSave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6

    GetActiveProject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7

    GetAutoSaveEnabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8

    GetDesigns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9

    GetDistributedAnalysisMachines . . . . . . . . . . . . . . . . . . . 4-10

    GetName [Desktop] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10

    GetLibraryDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12

    GetMessages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13

    GetPersonalLibDirectory . . . . . . . . . . . . . . . . . . . . . . . . . 4-15

    GetProjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16

    Contents-3

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    GetProjectDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17

    GetProjectList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17

    GetSysLibDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18

    GetTempDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19

    GetUserLibDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20

    GetVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21

    ImportANF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21

    ImportAutoCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22

    ImportGDSII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23

    ImportODB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24

    NewProject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24

    OpenAndConvertProject . . . . . . . . . . . . . . . . . . . . . . . . . 4-25

    OpenMultipleProjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25

    OpenProject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26

    PauseScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27

    Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28

    QuitApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28

    RestoreWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29

    RunProgram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30

    RunScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30

    SetActiveProject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31

    SetActiveProjectByPath . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32

    SetLibraryDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33

    SetProjectDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33

    SetTempDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33

    Sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34

    Desktop Commands For Registry Values . . . . . . . . . . . . . 4-35DoesRegistryValueExist . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35

    GetRegistryInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35

    GetRegistryString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36

    SetRegistryFromFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36

    SetRegistryInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36

    SetRegistryString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-37

    Contents-4

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    5. Project Object Script CommandsClose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

    CopyDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

    CutDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3

    DeleteDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3

    GetActiveDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3

    GetDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3

    GetName [Project] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4

    GetPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4

    GetTopDesignList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4

    InsertDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5

    Paste [Design] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6

    Redo [Project Level] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7

    Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8

    SaveAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8

    SetActiveDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10

    SimulateAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10

    Undo [Project] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11

    6. Material Script CommandsAddMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

    CloneMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4

    DoesMaterialExist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4

    EditMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6

    ExportMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6

    RemoveMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6

    7. Property Script CommandsCallback Scripting Using PropHost Object . . . . . . . . . . . 7-4

    ChangeProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8

    PropHost Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22Abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22

    AddMenuProp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22

    AddMenuProp2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22

    Contents-5

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    AddProp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23

    AddProp2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23

    ExecuteScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23

    GetApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24

    GetCallback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24

    GetChangedProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24

    GetDescription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24

    GetDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25

    GetEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25

    GetEvaluatedText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25

    GetFileName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26

    GetHidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26

    GetProgress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26

    GetPropHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26

    GetPropServers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27

    GetPropTabType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27

    GetReadOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27

    GetRunStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28

    GetProgress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28

    GetTabTypeName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28

    GetText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28

    GetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28

    IsValueConstant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-29

    PropertyExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-29

    RemoveProp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-29

    SetCallback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-30

    SetDescription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-30

    SetHidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-30

    SetReadOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-30

    SetText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-31

    SetValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-31

    Additional Property Scripting Commands . . . . . . . . . . . . . 7-31GetProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-31

    Contents-6

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    GetPropertyValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32

    GetArrayVariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32

    GetVariables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-33

    GetVariableValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-33

    SetPropertyValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-33

    SetVariableValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-34

    Additional Property Scripting Example . . . . . . . . . . . . . . . 7-35Example Use of Record Script and Edit Properties . . . . . 7-37

    8. Dataset Script CommandsAddDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

    DeleteDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

    EditDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

    ImportDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3

    9. Design Object Script CommandsApplyMeshOps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4

    Analyze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4

    AnalyzeDistributed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5

    AssignDCThickness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5

    ConstructVariationString . . . . . . . . . . . . . . . . . . . . . . . . . 9-6

    DeleteFieldVariation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7

    DeleteFullVariation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8

    DeleteLinkedDataVariation . . . . . . . . . . . . . . . . . . . . . . . 9-9

    DeleteVariation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11

    ExportConvergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11

    ExportMatrixData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13

    ExportMatrixData (2D Extractor) . . . . . . . . . . . . . . . . . . . 9-14

    ExportNetworkData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16

    ExportNMFData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18

    ExportMeshStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19

    ExportProfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20

    GetEdit SourcesCount . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21

    GetExcitationsModule . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21

    Contents-7

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    GetModule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23

    GetName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24

    GetNominalVariation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24

    GetSelections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24

    GetSolutionType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25

    GetSolveInsideThreshold . . . . . . . . . . . . . . . . . . . . . . . . . 9-25

    GetSourceContexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25

    GetVariationVariableValue . . . . . . . . . . . . . . . . . . . . . . . . 9-26

    Redo [Design] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-26

    RenameDesignInstance . . . . . . . . . . . . . . . . . . . . . . . . . . 9-26

    ResetToTimeZero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-27

    SARSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-27

    SetActiveEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-28

    SetBackgroundMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . 9-28

    SetDesignSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29

    SetLengthSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-30

    SetSolutionType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-31

    SetSolveInsideThreshold . . . . . . . . . . . . . . . . . . . . . . . . . 9-32

    SetSourceContexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-32

    Solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-32

    RunToolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-33

    Undo [Design] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-36

    10. Model Setup Script CommandsAssign Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2

    DeleteArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3

    EditArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4

    11. 3D Modeler Editor Script CommandsDraw Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2

    Create3D Component . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3

    CreateBondwire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4

    CreateBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5

    CreateCircle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6

    Contents-8

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    CreateCone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7

    CreateCutplane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7

    CreateCylinder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8

    CreateEllipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8

    CreateEquationCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9

    CreateEquationSurface . . . . . . . . . . . . . . . . . . . . . . . . . 11-9

    CreateHelix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-10

    CreatePoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11

    CreateUserDefinedPart . . . . . . . . . . . . . . . . . . . . . . . . . 11-11

    CreatePolyline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-12

    CreateRectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-15

    CreateRectangle (2D Extractor) . . . . . . . . . . . . . . . . . . . 11-15

    CreateRegion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-16

    CreateRegularPolyhedron . . . . . . . . . . . . . . . . . . . . . . . 11-18

    CreateRegularPolygon . . . . . . . . . . . . . . . . . . . . . . . . . . 11-19

    CreateRegularPolyhedron (2D Extractor) . . . . . . . . . . . 11-20

    CreateSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-20

    CreateSpiral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-21

    CreateTorus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-21

    CreateUserDefinedPart . . . . . . . . . . . . . . . . . . . . . . . . . 11-22

    Edit3DComponent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-23

    EditPolyline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-23

    Get3DComponentParameters . . . . . . . . . . . . . . . . . . . . 11-24

    Get3DComponentDefinitionNames . . . . . . . . . . . . . . . . 11-24

    Get3DComponentInstanceNames . . . . . . . . . . . . . . . . . 11-24

    Get3DComponentMaterialNames . . . . . . . . . . . . . . . . . 11-25

    Get3DComponentMaterialProperties . . . . . . . . . . . . . . . 11-25

    Insert3DComponent . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25

    InsertPolylineSegment . . . . . . . . . . . . . . . . . . . . . . . . . . 11-26

    SweepAlongPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-27

    SweepAlongVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-27

    SweepAroundAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-28

    SweepFacesAlongNormal . . . . . . . . . . . . . . . . . . . . . . . 11-28

    Contents-9

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    SweepFacesAlongNormalWithAttributes . . . . . . . . . . . . 11-29

    UpdateComponentDefinition . . . . . . . . . . . . . . . . . . . . . 11-30

    Edit Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-30Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-30

    DeletePolylinePoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31

    DuplicateAlongLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31

    DuplicateAroundAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-32

    DuplicateAroundAxis (2D Extractor) . . . . . . . . . . . . . . . 11-33

    DuplicateMirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-33

    DuplicateMirror (2D Extractor) . . . . . . . . . . . . . . . . . . . . 11-34

    Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-35

    Mirror (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-35

    Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-36

    OffsetFaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-36

    Paste [Model Editor] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-36

    Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-37

    Rotate (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-37

    Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-37

    Scale (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-38

    Modeler Menu Commands . . . . . . . . . . . . . . . . . . . . . . . 11-38AssignMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-39

    Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-40

    Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-40

    CoverLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-40

    CoverSurfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-41

    CreateEntityList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-41

    CreateFaceCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-41

    CreateFaceCS (2D Extractor) . . . . . . . . . . . . . . . . . . . . 11-43

    CreateObjectCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-44

    CreateObjectFromEdges . . . . . . . . . . . . . . . . . . . . . . . . 11-47

    CreateObjectFromFaces . . . . . . . . . . . . . . . . . . . . . . . . 11-47

    CreateRelativeCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-48

    CreateRelativeCS (2D Extractor) . . . . . . . . . . . . . . . . . . 11-49

    Contents-10

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    DeleteLastOperation . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-49

    DetachFaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-49

    EditEntityList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-50

    EditFaceCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-50

    EditObjectCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-51

    EditRelativeCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-53

    EditRelativeCS (2D Extractor) . . . . . . . . . . . . . . . . . . . . 11-53

    Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-54

    ExportModelImageToFile . . . . . . . . . . . . . . . . . . . . . . . . 11-54

    Fillet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-56

    GenerateHistory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-56

    HealObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-56

    GetActiveCoordinateSystem . . . . . . . . . . . . . . . . . . . . . 11-58

    GetCoordinateSystems . . . . . . . . . . . . . . . . . . . . . . . . . 11-59

    Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-59

    ImportDXF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-60

    ImportGDSII [Modeler Import] . . . . . . . . . . . . . . . . . . . . 11-62

    Intersect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-63

    MoveCStoEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-63

    MoveFaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-64

    MoveFaces (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . 11-65

    ProjectSheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-66

    PurgeHistory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-67

    Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-67

    Section (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . . 11-68

    SeparateBody . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-68

    SetModelUnits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-68

    SetWCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-69

    ShowWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-69

    Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-69

    Split (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-70

    Subtract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-70

    SweepFacesAlongNormal . . . . . . . . . . . . . . . . . . . . . . . 11-71

    Contents-11

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    ThickenSheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-72

    UncoverFaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-72

    Unite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-73

    WrapSheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-73

    Other oEditor Commands . . . . . . . . . . . . . . . . . . . . . . . . 11-74ChangeProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-75

    Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-76

    GetBodyNamesByPosition . . . . . . . . . . . . . . . . . . . . . . . 11-76

    GetEdgeByPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-77

    GetEdgeByPosition (2D Extractor) . . . . . . . . . . . . . . . . 11-77

    GetEdgeByID (Q3D Extractor) . . . . . . . . . . . . . . . . . . . . 11-78

    GetEdgeIDsFromFace . . . . . . . . . . . . . . . . . . . . . . . . . . 11-78

    GetEdgeIDsFromObject . . . . . . . . . . . . . . . . . . . . . . . . . 11-78

    GetFaceArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-79

    GetFaceCenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-79

    GetFaceByPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-79

    GetFaceByPosition (2D Extractor) . . . . . . . . . . . . . . . . . 11-80

    GetFaceIDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-80

    GetModelBoundingBox . . . . . . . . . . . . . . . . . . . . . . . . . 11-81

    GetObjectIDByName . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-81

    GetObjectName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-81

    GetObjectNameByFaceID . . . . . . . . . . . . . . . . . . . . . . . 11-81

    GetObjectsByMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . 11-82

    GetObjectsInGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-82

    GetMatchedObjectName . . . . . . . . . . . . . . . . . . . . . . . . 11-83

    GetModelUnits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-83

    GetNumObjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-83

    GetSelections [Model Editor] . . . . . . . . . . . . . . . . . . . . . 11-83

    GetUserPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-84

    GetVertexIDsFromEdge . . . . . . . . . . . . . . . . . . . . . . . . . 11-84

    GetVertexIDsFromFace . . . . . . . . . . . . . . . . . . . . . . . . . 11-85

    GetVertexIDsFromObject . . . . . . . . . . . . . . . . . . . . . . . . 11-85

    GetVertexPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-85

    Contents-12

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    PageSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-86

    RenamePart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-86

    12. Output Variable Script CommandsCreateOutputVariable . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2

    DeleteOutputVariable . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4

    DoesOutputVariableExist . . . . . . . . . . . . . . . . . . . . . . . . 12-5

    EditOutputVariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5

    GetOutputVariableValue . . . . . . . . . . . . . . . . . . . . . . . . 12-7

    SimValueContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14

    13. Reporter Editor Script CommandsAddCartesianLimitLine . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3

    AddCartesianXMarker . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4

    AddDeltaMarker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5

    AddMarker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-6

    AddNote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-6

    AddTraces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-7

    AddQuickEyeAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11

    AddVerifEyeAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-13

    ClearAllMarkers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-16

    CopyTracesData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-17

    CopyReportData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-17

    CopyReportDefinitions . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18

    CopyTraceDefinitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18

    CreateReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-19

    CreateReport [Designer] . . . . . . . . . . . . . . . . . . . . . . . . 13-22

    CreateReport (Q3D Extractor) . . . . . . . . . . . . . . . . . . . . 13-25

    CreateReport (2D Extractor) . . . . . . . . . . . . . . . . . . . . . 13-26

    CreateReportFromTemplate . . . . . . . . . . . . . . . . . . . . . 13-28

    CreateReportOfAllQuantities . . . . . . . . . . . . . . . . . . . . . 13-29

    DeleteMarker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-29

    DeleteAllReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-30

    DeleteReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-30

    Contents-13

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    DeleteTraces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-31

    EditQuickEyeAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . 13-31

    EditVerifEyeAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-34

    ExportPlotImageToFile [Reporter] . . . . . . . . . . . . . . . . . 13-36

    ExportReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-37

    ExportToFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-38

    ExportToFile [Reporter] . . . . . . . . . . . . . . . . . . . . . . . . . 13-39

    ExportMarkerTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-39

    FFTOnReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-40

    GetAllReportNames . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-42

    GetAllCategories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-43

    GetAllQuantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-43

    GetAvailableDisplayTypes . . . . . . . . . . . . . . . . . . . . . . . 13-44

    GetAvailableReportTypes . . . . . . . . . . . . . . . . . . . . . . . 13-44

    GetAvailableSolutions . . . . . . . . . . . . . . . . . . . . . . . . . . 13-45

    GetDisplayType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-45

    GetSolutionContexts . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-47

    ImportIntoReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-47

    PasteReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-48

    PasteTraces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-48

    RenameReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-48

    RenameTrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-49

    UpdateAllReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-49

    UpdateReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-50

    UpdateTraces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-50

    UpdateTracesContextandSweeps . . . . . . . . . . . . . . . . . 13-55

    14. Boundary and Excitation Module Script Com-mands

    General Commands Recognized by the Boundary/Excitations Module . . . . . . . . . . . . . . . . . . . . . 14-2

    AutoIdentifyPorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3

    AutoIdentifyTerminals . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4

    Contents-14

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    ChangeImpedanceMult . . . . . . . . . . . . . . . . . . . . . . . . . 14-4

    DeleteAllBoundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4

    DeleteAllExcitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5

    DeleteBoundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5

    GetBoundaryAssignment . . . . . . . . . . . . . . . . . . . . . . . . 14-6

    GetBoundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6

    GetBoundariesOfType . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6

    GetDefaultBaseName . . . . . . . . . . . . . . . . . . . . . . . . . . 14-7

    GetExcitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-7

    GetExcitationsOfType . . . . . . . . . . . . . . . . . . . . . . . . . . 14-7

    GetNumBoundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-8

    GetNumBoundariesOfType . . . . . . . . . . . . . . . . . . . . . . 14-8

    GetNumExcitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-8

    GetExcitationAssignment (2D Extractor) . . . . . . . . . . . . 14-9

    GetNumExcitationsOfType . . . . . . . . . . . . . . . . . . . . . . . 14-9

    GetPortExcitationCounts . . . . . . . . . . . . . . . . . . . . . . . . 14-9

    ReassignBoundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-10

    RenameBoundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-11

    ReprioritizeBoundaries . . . . . . . . . . . . . . . . . . . . . . . . . . 14-11

    SetDefaultBaseName . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12

    Script Commands for Creating and Modifying Boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-13

    AssignCurent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-14

    AssignFiniteCond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-15

    AssignFloquet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-16

    AssignHalfSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-19

    AssignIERegion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-19

    AssignImpedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-20

    AssignIncidentWave . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-20

    AssignLayeredImp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-22

    AssignLumpedPort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-23

    AssignLumpedRLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-25

    AssignMagneticBias . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-26

    Contents-15

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    AssignMaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-27

    AssignPerfectE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-28

    AssignPerfectH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-28

    AssignRadiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-28

    AssignScreeningImpedance . . . . . . . . . . . . . . . . . . . . . 14-30

    AssignSlave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-32

    AssignSymmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-33

    AssignTerminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-34

    AssignVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-35

    AssignWavePort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-36

    EditCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-38

    EditDiffPairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-38

    EditFiniteCond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-39

    EditHalfSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-40

    EditImpedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-41

    EditIncidentWave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-41

    EditLayeredImpedance . . . . . . . . . . . . . . . . . . . . . . . . . 14-42

    EditMaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-42

    EditPerfectE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-43

    EditPerfectH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-43

    EditLumpedPort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-43

    EditLumpedRLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-44

    EditMagneticBias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-44

    EditRadiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-44

    EditSlave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-46

    EditSymmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-46

    EditTerminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-46

    EditVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-47

    EditWavePort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-47

    SetTerminalReferenceImpedances . . . . . . . . . . . . . . . . 14-47

    UnassignIERegions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-47

    Script Commands for Creating and Modifying Boundaries in HFSS-IE . . . . . . . . . . . . . . . . . . . . . . . . . . 14-49

    Contents-16

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    AssignAperature [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . . 14-49

    AssignFiniteCond [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . 14-49

    AssignHalfSpace [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . . 14-50

    AssignImpedance [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . 14-51

    AssignInfiniteGroundPlane [HFSS-IE] . . . . . . . . . . . . . . 14-51

    AssignLumpedPort [HFSS-IE] . . . . . . . . . . . . . . . . . . . . 14-52

    Script Commands for Creating and Modifying PMLs . . . 14-53CreatePML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-53

    ModifyPMLGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-55

    PMLGroupCreated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-55

    PMLGroupModified . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-56

    RecalculatePMLMaterials . . . . . . . . . . . . . . . . . . . . . . . 14-56

    Script Commands for Creating and Modifying Boundaries in 2D Extractor . . . . . . . . . . . . . . . . . . . . . . . 14-56

    AutoAssignSignals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-57

    AssignSingleSignalLine . . . . . . . . . . . . . . . . . . . . . . . . . 14-57

    AssignSingleNonIdealGround . . . . . . . . . . . . . . . . . . . . 14-58

    AssignSingleReferenceGround . . . . . . . . . . . . . . . . . . . 14-59

    AssignSingleSurfaceGround . . . . . . . . . . . . . . . . . . . . . 14-59

    AssignSingleFloatingLine . . . . . . . . . . . . . . . . . . . . . . . . 14-60

    AssignMultiFloatingLine . . . . . . . . . . . . . . . . . . . . . . . . . 14-61

    AssignMultiSignalLine . . . . . . . . . . . . . . . . . . . . . . . . . . 14-62

    AssignMultiNonIdealGround . . . . . . . . . . . . . . . . . . . . . 14-63

    ToggleConductor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-64

    EditSignalLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-64

    EditNonIdealGround . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-65

    EditReferenceGround . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-66

    EditSurfaceGround . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-66

    EditFloatingLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-67

    GetNumExcitations (2D Extractor) . . . . . . . . . . . . . . . . . 14-68

    GetExcitationAssignment (2D Extractor) . . . . . . . . . . . . 14-68

    GetExcitations (2D Extractor) . . . . . . . . . . . . . . . . . . . . . 14-68

    SetConductivityThreshold (2D Extractor) . . . . . . . . . . . 14-68

    Contents-17

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    AssignFiniteCond [2D Extractor] . . . . . . . . . . . . . . . . . . 14-70

    EditFiniteCond [2D Extractor] . . . . . . . . . . . . . . . . . . . . . 14-71

    Script Commands for Creating and Modifying Boundaries in Q3D Extractor . . . . . . . . . . . . . . . . . . . . . . 14-73

    Assign2DTerminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-73

    AssignNet [Q3D Extractor] . . . . . . . . . . . . . . . . . . . . . . . 14-74

    AssignSource [Q3D Extractor] . . . . . . . . . . . . . . . . . . . . 14-74

    AssignSink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-74

    AssignTerminals [Q3D Extractor] . . . . . . . . . . . . . . . . . . 14-75

    AssignThinConductor . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-75

    EditThinConductor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-76

    EditNet [Q3D Extractor] . . . . . . . . . . . . . . . . . . . . . . . . . 14-77

    GetExcitationAssignment [Q3D Extractor] . . . . . . . . . . . 14-77

    GetExcitations [Q3D Extractor] . . . . . . . . . . . . . . . . . . . 14-77

    GetNumExcitations [Q3D Extractor] . . . . . . . . . . . . . . . 14-77

    ToggleTerminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-78

    SetMaterialThresholds [Q3D Extractor] . . . . . . . . . . . . . 14-78

    15. Mesh Operations Module Script CommandsGeneral Commands Recognized by the Mesh Operations Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2

    DeleteOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2

    GetOperationNames . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2

    RenameOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2

    Script Commands for Creating and Modifying Mesh Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-4

    AssignLengthOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-4

    AssignModelResolutionOp . . . . . . . . . . . . . . . . . . . . . . . 15-5

    AssignSkinDepthOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-5

    AssignTrueSurfOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-6

    EditLengthOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-7

    EditModelResolutionOp . . . . . . . . . . . . . . . . . . . . . . . . . 15-8

    EditSkinDepthOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-8

    EditTrueSurfOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-8

    Contents-18

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    16. Analysis Setup Module Script CommandsCopySetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2

    CopySweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2

    DeleteDrivenSweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3

    DeleteSetups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3

    DeleteSweep [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . . . . . 16-3

    EditFrequencySweep . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4

    EditSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4

    EditSetup (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . 16-6

    EditSweep [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-6

    EditCircuitSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8

    ExportCircuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8

    ExportCircuit (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . 16-11

    GetSetupCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15

    GetSetups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15

    GetSetupNames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15

    GetSweepCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15

    GetSweeps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-16

    InsertFrequencySweep . . . . . . . . . . . . . . . . . . . . . . . . . 16-16

    InsertSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-23

    InsertSetup (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . 16-29

    InsertSetup [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . . . . . . 16-31

    InsertSetup [Transient] . . . . . . . . . . . . . . . . . . . . . . . . . . 16-32

    InsertSweep [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . . . . . 16-34

    PasteSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-37

    PasteSweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-37

    RenameDrivenSweep . . . . . . . . . . . . . . . . . . . . . . . . . . 16-37

    RenameSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-38

    RenameSweep [HFSS-IE] . . . . . . . . . . . . . . . . . . . . . . . 16-38

    RevertAllToInitial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-39

    RevertSetupToInitial . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-39

    SetMPIVendor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-40

    Contents-19

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    17. Optimetrics Module Script CommandsGeneral Commands Recognized by the Optimetrics Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-5

    CopySetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-5

    DeleteSetups [Optimetrics] . . . . . . . . . . . . . . . . . . . . . . 17-5

    DistributedAnalyzeSetup . . . . . . . . . . . . . . . . . . . . . . . . 17-6

    ExportDXConfigFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-6

    ExportOptimetricsProfile . . . . . . . . . . . . . . . . . . . . . . . . 17-6

    ExportOptimetricsResult . . . . . . . . . . . . . . . . . . . . . . . . 17-7

    ExportParametricResults . . . . . . . . . . . . . . . . . . . . . . . . 17-8

    GetSetupNames [Optimetrics] . . . . . . . . . . . . . . . . . . . . 17-9

    GetSetupNamesByType [Optimetrics] . . . . . . . . . . . . . . 17-9

    ImportSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-9

    PasteSetup [Optimetrics] . . . . . . . . . . . . . . . . . . . . . . . . 17-10

    RenameSetup [Optimetrics] . . . . . . . . . . . . . . . . . . . . . . 17-10

    SolveSetup [Optimetrics] . . . . . . . . . . . . . . . . . . . . . . . . 17-11

    SolveAllSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-11

    Parametric Script Commands . . . . . . . . . . . . . . . . . . . . . 17-12EditSetup [Parametric] . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12

    GenerateVariationData (Parametric) . . . . . . . . . . . . . . . 17-12

    InsertSetup [Parametric] . . . . . . . . . . . . . . . . . . . . . . . . 17-12

    Optimization Script Commands . . . . . . . . . . . . . . . . . . . . 17-16EditSetup [Optimization] . . . . . . . . . . . . . . . . . . . . . . . . . 17-16

    InsertSetup [Optimization] . . . . . . . . . . . . . . . . . . . . . . . 17-16

    Sensitivity Script Commands . . . . . . . . . . . . . . . . . . . . . 17-20EditSetup [Sensitivity] . . . . . . . . . . . . . . . . . . . . . . . . . . 17-20

    InsertSetup [Sensitivity] . . . . . . . . . . . . . . . . . . . . . . . . . 17-20

    Statistical Script Commands . . . . . . . . . . . . . . . . . . . . . . 17-22EditSetup [Statistical] . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-22

    InsertSetup [Statistical] . . . . . . . . . . . . . . . . . . . . . . . . . 17-24

    18. Solutions Module Script CommandsDeleteImportData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-2

    Contents-20

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    EditSources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-2

    DeleteSolutionVariation . . . . . . . . . . . . . . . . . . . . . . . . . 18-6

    DeleteVariation [HFSS] . . . . . . . . . . . . . . . . . . . . . . . . . 18-8

    ExportForSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-8

    ExportEigenmodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-9

    ExportForHSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-10

    ExportNetworkData . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-11

    ExportNMFData [HFSS] . . . . . . . . . . . . . . . . . . . . . . . . . 18-13

    GetAdaptiveFreq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-14

    GetAvailableVariations . . . . . . . . . . . . . . . . . . . . . . . . . . 18-14

    GetExcitationScaling . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-15

    GetISolutionVersionID . . . . . . . . . . . . . . . . . . . . . . . . . . 18-15

    GetSolveRangeInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-15

    GetValidISolutionList . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-16

    HasFields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-16

    HasMatrixData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-17

    HasMesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-17

    ImportSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-18

    ImportTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-18

    IsFieldAvailableAt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-20

    ListMatchingVariations . . . . . . . . . . . . . . . . . . . . . . . . . . 18-20

    ListValuesOfVariable . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-21

    ListVariations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-21

    19. Reduce Matrix Module Script CommandsInsertRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2

    EditRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-3

    RMAddOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-4

    DupRMAddOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-4

    RenameRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-4

    RenameRMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-5

    DeleteRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-5

    DeleteRMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-6

    DupRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-6

    Contents-21

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    2D Extractor Reduce Matrix Commands . . . . . . . . . . . . 19-7InsertRM (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . 19-7

    EditRM (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . . 19-8

    RMAddOp (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . 19-8

    DupRMAddOp (2D Extractor) . . . . . . . . . . . . . . . . . . . . 19-9

    RenameRM (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . 19-9

    RenameRMO (2D Extractor) . . . . . . . . . . . . . . . . . . . . . 19-10

    DeleteRM (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . 19-10

    DeleteRMO (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . 19-10

    DupRM (2D Extractor) . . . . . . . . . . . . . . . . . . . . . . . . . . 19-11

    ReorderMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-11

    AlphaNumericMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-12

    2D Extractor Reduce Operations . . . . . . . . . . . . . . . . . . 19-12AddGround . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-12

    SetReferenceGround . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-13

    Float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-14

    Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-14

    Diff Pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-15

    20. Field Overlays Module Script CommandsCreateFieldPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-2

    DeleteFieldPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-11

    GetFieldPlotNames . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-11

    ModifyFieldPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-12

    RenameFieldPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-13

    RenamePlotFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-13

    SetFieldPlotSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-14

    SetPlotFolderSettings . . . . . . . . . . . . . . . . . . . . . . . . . . 20-15

    21. Fields Calculator Script CommandsAddNamedExpression . . . . . . . . . . . . . . . . . . . . . . . . . . 21-3

    AddNamedExpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-3

    CalcOp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-3

    CalcRead(deprecated) . . . . . . . . . . . . . . . . . . . . . . . . . . 21-4

    Contents-22

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    CalculatorRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-4

    CalcStack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-5

    CalculatorWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-5

    ChangeGeomSettings . . . . . . . . . . . . . . . . . . . . . . . . . . 21-6

    ClcEval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-6

    ClcMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-6

    ClearAllNamedExpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-7

    CopyNamedExprToStack . . . . . . . . . . . . . . . . . . . . . . . . 21-7

    DeleteNamedExpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-7

    EnterComplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-8

    EnterComplexVector . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-8

    EnterLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-9

    EnterPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-9

    EnterQty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-9

    EnterScalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-10

    EnterScalarFunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-10

    EnterSurf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-10

    EnterVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-10

    EnterVectorFunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-11

    EnterVol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-11

    ExportOnGrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-12

    ExportOnGrid (2D Extractor) . . . . . . . . . . . . . . . . . . . . . 21-13

    ExportToFile [Fields Calculator] . . . . . . . . . . . . . . . . . . . 21-14

    GetTopEntryValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-14

    LoadNamedExpressions . . . . . . . . . . . . . . . . . . . . . . . . 21-15

    SaveNamedExpressions . . . . . . . . . . . . . . . . . . . . . . . . 21-15

    22. Radiation Module Script CommandsGeneral Commands Recognized by the Radiation Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-2

    DeleteFarFieldSetup . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-2

    DeleteNearFieldSetup . . . . . . . . . . . . . . . . . . . . . . . . . . 22-2

    GetSetupNames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-2

    RenameSetup [Radiation] . . . . . . . . . . . . . . . . . . . . . . . 22-3

    Contents-23

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    Script Commands for Creating and Modifying Radiation Setups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-4

    EditFarFieldSphereSetup . . . . . . . . . . . . . . . . . . . . . . . . 22-4

    EditNearFieldLineSetup . . . . . . . . . . . . . . . . . . . . . . . . . 22-4

    EditNearFieldSphereSetup . . . . . . . . . . . . . . . . . . . . . . 22-5

    InsertFarFieldSphereSetup . . . . . . . . . . . . . . . . . . . . . . 22-5

    InsertNearFieldLineSetup . . . . . . . . . . . . . . . . . . . . . . . 22-6

    InsertNearFieldSphereSetup . . . . . . . . . . . . . . . . . . . . . 22-7

    Script Commands for Modifying Antenna Array Setups . 22-8EditAntennaArraySetup . . . . . . . . . . . . . . . . . . . . . . . . . 22-8

    Script Commands for Exporting Antenna Parameters and Max Field Parameters . . . . . . . . . . . . . . . . . . . . . . . 22-12

    ExportRadiationParametersToFile . . . . . . . . . . . . . . . . . 22-12

    23. User Defined Solutions CommandsCreateUserDefinedSolution . . . . . . . . . . . . . . . . . . . . . . 23-1

    DeleteUserDefinedSolutions . . . . . . . . . . . . . . . . . . . . . 23-3

    EditUserDefinedSolution . . . . . . . . . . . . . . . . . . . . . . . . 23-4

    24. NdExplorer Script CommandsNdExplorer Manager Script Commands . . . . . . . . . . . . . 24-2

    ExportFullWaveSpice [NdExplorer] . . . . . . . . . . . . . . . . 24-2

    ExportNetworkData [NdExplorer] . . . . . . . . . . . . . . . . . . 24-3

    ExportNMFData [NdExplorer] . . . . . . . . . . . . . . . . . . . . 24-4

    25. CompInstance Script CommandsCallback Scripting Using CompInstance Object . . . . . . . 25-2

    CompInstance Functions . . . . . . . . . . . . . . . . . . . . . . . . . 25-2GetComponentName . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-3

    GetEditor [Component Instance] . . . . . . . . . . . . . . . . . . 25-3

    GetInstanceID [Component Instance] . . . . . . . . . . . . . . 25-3

    GetInstanceName [Component Instance] . . . . . . . . . . . 25-4

    GetParentDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-4

    GetPropHost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-4

    GetPropServerName . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-4

    Contents-24

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    26. Layout ScriptingObject Identifiers and Script Recording . . . . . . . . . . . . . . 26-2Create Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-2

    CreateCircle (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-2

    CreateLine (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-3

    CreateRectangle (Layout Editor) . . . . . . . . . . . . . . . . . . 26-5

    CreatePolygon (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-6

    CreateText (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-6

    Create Voids in Primitives . . . . . . . . . . . . . . . . . . . . . . . . 26-8CreateCircleVoid (Layout Editor) . . . . . . . . . . . . . . . . . . 26-8

    CreateLineVoid (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-9

    CreatePolygonVoid (Layout Editor) . . . . . . . . . . . . . . . . 26-10

    CreateRectangleVoid (Layout Editor) . . . . . . . . . . . . . . 26-10

    Other Creation Methods . . . . . . . . . . . . . . . . . . . . . . . . . 26-11AddCircuitRefPort (Layout Editor) . . . . . . . . . . . . . . . . . 26-11

    AddRefPort (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-13

    AssignCircuitRefPort (Layout Editor) . . . . . . . . . . . . . . . 26-14

    AssignRefPort (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-16

    CreateCircuitPort (Layout Editor) . . . . . . . . . . . . . . . . . . 26-17

    CreateComponent (Layout Editor) . . . . . . . . . . . . . . . . . 26-19

    CreateEdgePort (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-20

    CreateHole (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-21

    CreateMeasure (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-22

    CreateNPort (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-24

    CreatePin (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-25

    CreateTrace (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-26

    CreateVia (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-29

    Object Movement and Modification Methods . . . . . . . . . 26-30Connect (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-30

    Copy (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-31

    Delete (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-31

    Disconnect (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-31

    Edit (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-31

    Contents-25

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    FlipHorizontal (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-32

    FlipVertical (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-33

    Move (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-33

    Paste (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-33

    Rotate (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-33

    Activation and Deactivation Methods . . . . . . . . . . . . . . . 26-34Activate (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-34

    DeactivateOpen (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-34

    DeactivateShort (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-34

    Delete (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-35

    Layout and Geometry Interrogation Methods . . . . . . . . . 26-35Layout Interrogation (Layout Editor) . . . . . . . . . . . . . . . . 26-35

    Point (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-36

    Polygon (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-36

    FindObjects (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-36

    FilterObjectList (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-37

    GetCSObjects (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-37

    GetPolygon (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-37

    GetPolygonDef (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-37

    GetBBox (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-37

    FindObjectsByPolygon (Layout Editor) . . . . . . . . . . . . . 26-38

    FindObjectsByPoint (Layout Editor) . . . . . . . . . . . . . . . . 26-38

    CreateObjectFromPolygon (Layout Editor) . . . . . . . . . . 26-38

    CreateLineFromPolygon (Layout Editor) . . . . . . . . . . . . 26-39

    Point Object (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-39Set (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-40

    SetX (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-40

    GetX (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-40

    SetY (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-40

    GetY (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-40

    SetArc (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-41

    IsArc (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-41

    IsEqual (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-41

    Contents-26

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    Mag (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-41

    Distance (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-41

    Cross (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-41

    Move (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-42

    Rotate (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-42

    Normalize (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-42

    DistanceFromLine (Layout Editor) . . . . . . . . . . . . . . . . . 26-42

    ClosestPointOnLine (Layout Editor) . . . . . . . . . . . . . . . 26-42

    Polygon Object (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-43AddPoint (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-44

    SetClosed (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-44

    IsClosed (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-44

    Move(Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-44

    Rotate (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-44

    Scale (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-45

    MirrorX (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-45

    GetPoints (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-45

    AddHole (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-45

    HasHoles (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-45

    GetHoles (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-46

    HasArcs (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-46

    HasSelfIntersections (Layout Editor) . . . . . . . . . . . . . . . 26-46

    BBoxLL (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-46

    BBoxUR (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-46

    IsParametric (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-46

    IsConvex (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-47

    IsPoint (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-47

    IsSegment (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-47

    IsArc (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-47

    IsBox (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-47

    IsCircle (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-47

    GetBoundingCircleCenter (Layout Editor) . . . . . . . . . . . 26-48

    GetBoundingCircleRadius (Layout Editor) . . . . . . . . . . . 26-48

    Contents-27

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    Area (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-48

    PointInPolygon (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-48

    CircleIntersectsPolygon (Layout Editor) . . . . . . . . . . . . 26-48

    GetIntersectionType (Layout Editor) . . . . . . . . . . . . . . . 26-48

    GetClosestPoint (Layout Editor) . . . . . . . . . . . . . . . . . . 26-49

    GetClosestPoints (Layout Editor) . . . . . . . . . . . . . . . . . . 26-49

    Unite (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-49

    Intersect (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-50

    Subtract (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-50

    Xor (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-50

    Boolean Operations on Primitives . . . . . . . . . . . . . . . . . . 26-50Unite (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-50

    Intersect (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-51

    Subtract (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-51

    Coordinate System Methods . . . . . . . . . . . . . . . . . . . . . . 26-51CreateCS (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-52

    ClearRelative (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-54

    Create3DStructure (Layout Editor) . . . . . . . . . . . . . . . . 26-55

    Group (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-55

    CreateGroupSelected (Layout Editor) . . . . . . . . . . . . . . 26-55

    PositionRelative (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-55

    GetCSObjects (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-57

    SetCS (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-58

    Ungroup (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-58

    NetClass Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-58CreateNetClass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-58

    ModifyNetClass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-59

    DelNetClass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-59

    GetNetClassNets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-59

    GetNetClasses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-59

    Miscellaneous Methods . . . . . . . . . . . . . . . . . . . . . . . . . . 26-59AddLayer (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-61

    AddStackupLayer (Layout Editor) . . . . . . . . . . . . . . . . . 26-62

    Contents-28

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    AlignObjects (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-64

    AlignPorts (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-64

    ChangeLayers (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-65

    ChangeOptions (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-67

    ClearLayerMappings (Layout Editor) . . . . . . . . . . . . . . . 26-72

    ClearRefPort (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-72

    CopyToPlanarEM (Layout Editor) . . . . . . . . . . . . . . . . . 26-73

    CreatePortInstancePorts (Layout Editor) . . . . . . . . . . . . 26-73

    CreatePortsOnComponents (Layout Editor) . . . . . . . . . 26-73

    CutOutSubDesign (Layout Editor) . . . . . . . . . . . . . . . . . 26-74

    DefeatureObjects (Layout Editor) . . . . . . . . . . . . . . . . . 26-77

    Duplicate (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . 26-78

    DuplicateAcrossLyrs (Layout Editor) . . . . . . . . . . . . . . . 26-78

    EraseMeasurements (Layout Editor) . . . . . . . . . . . . . . . 26-79

    ExportDXF (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-79

    ExportGDSII (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-80

    ExportGerber (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-81

    ExportNCDrill (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-82

    GetAllLayerNames (Layout Editor) . . . . . . . . . . . . . . . . 26-84

    GetComponentInfo (Layout Editor) . . . . . . . . . . . . . . . . 26-84

    GetCompInstanceFromRefDes (Layout Editor) . . . . . . . 26-85

    GetComponentPins (Layout Editor) . . . . . . . . . . . . . . . . 26-85

    GetComponentPinInfo (Layout Editor) . . . . . . . . . . . . . . 26-86

    GetEditorName (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-87

    GetLayerInfo (Layout Editor) . . . . . . . . . . . . . . . . . . . . . 26-87

    GetMaterialList (Layout Editor) . . . . . . . . . . . . . . . . . . . 26-88

    GetNetConnections (Layout Editor) . . . . . . . . . . . . . . . . 26-88

    GetPortInfo (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-89

    GetProperties (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-91

    GetPropertyValue (Layout Editor) . . . . . . . . . . . . . . . . . 26-91

    GetSelections (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-91

    GetStackupLayerNames (Layout Editor) . . . . . . . . . . . . 26-91

    HighlightNet (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . 26-92

    Contents-29

    ANSYS Electromagnetics Suite 16.2 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential informationof ANSYS, Inc. and its subsidiaries and affiliates.

  • Introduction to Scripting in ANSYS Electronics Desktop

    PageSetup (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-92

    RemoveLayer (Layout Editor) . . . . . . . . . . . . . . . . . . . . 26-93

    RemovePortsOnComponents (Layout Editor) . . . . . . . . 26-93

    SelectAll (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . . . 26-93

    SetLayerMapping (Layout Editor) . . . . . . . . . . . . . . . . . 26-94

    SetPropertyValue (Layout Ed . . . . . . . . . . . . . . . . . . . . . 26-94

    StitchLines (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-95

    UnselectAll (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-95

    ZoomToFit (Layout Editor) . . . . . . . . . . . . . . . . . . . . . . . 26-95

    27. Schematic ScriptingMethod Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-2Editor Scripting IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-4Create Method List . . . . . . . . . . . . . . . . . . . .