Tekla Open API Developer's Guide Tekla Structures 20.0 February 2014 Copyright
Tekla Open API Developer's Guide Tekla Structures 20.0 February 2014 Copyright © 2014 Tekla Corporation © 2014 Tekla Corporation and its licensors. All rights reserved. This Software Manual has been developed for use with the referenced Software. Use of the Software, and use of this Software Manual are governed by a License Agreement. Among other provisions, the License Agreement sets certain warranties for the Software and this Manual, disclaims other warranties, limits recoverable damages, defines permitted uses of the Software, and determines whether you are an authorized user of the Software. Please refer to the License Agreement for important obligations and applicable limitations and restrictions on your rights. In addition, this Software Manual is protected by copyright law and by international treaties. Unauthorized reproduction, display, modification, or distribution of this Manual, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the full extent permitted by law. Tekla is a trademark of Tekla Corporation. Tekla is a registered trademark of Tekla Corporation in the European Union, the United States, and in several other countries. Tekla Structures, Xcity, Xengineer, Xpipe, Xroad, Xstreet, Xpower, Xsteel, and Xstreet are either registered trademarks or trademarks of Tekla Corporation in the European Union, the United States, and/or other countries. Other product and company names mentioned in this Manual are or may be trademarks of their respective owners. By referring to a third-party product or brand, Tekla does not intend to suggest an affiliation with or endorsement by such third party and disclaims any such affiliation or endorsement, except where otherwise expressly stated. Portions of this software: D-Cubed 2D DCM © 2008 Siemens Product Lifecycle Management Software III (GB) Ltd. All rights reserved. EPM toolkit © 1995-2004 EPM Technology a.s., Oslo, Norway. All rights reserved. XML parser © 1999 The Apache Software Foundation. All rights reserved. Project Data Control Library © 2006 - 2007 DlhSoft. All rights reserved. DWGdirect, DGNdirect and OpenDWG Toolkit/Viewkit libraries © 1998-2005 Open Design Alliance. All rights reserved. FLEXnet Copyright © 2006 Acresso Software Inc. All Rights Reserved. This product contains proprietary and confidential technology provided by and owned byAcresso Software Inc. Of Chicago, Illinois, USA. Any use, copying, publication, distribution, display, modification, or transmission of such technology in whole or in part in any form or by any means without the prior express written permission of Acresso Software Inc. is strictly prohibited. Except where expressly provided by Acresso Software Inc. in writing, possession of this technology shall not be construed to confer any license or rights under any of Acresso Software´s intellectual property rights, whether by estoppel, implication, or otherwise. Elements of the software described in this Manual may be the subject of pending patent applications in the European Union and/or other countries. TEKLA OPEN API DEVELOPER'S GUIDE i Contents Contents Tekla Open API .................................................................................................................... 1 Developer's Guide ............................................................................................................................... 1 Contents ............................................................................................................................... i Introduction ......................................................................................................................... 1 What is Tekla Open API?..................................................................................................................... 1 Where to utilize the Tekla Open API? .................................................................................................. 1 Where to find support? ........................................................................................................................ 2 About Assemblies ............................................................................................................... 3 Introduction .......................................................................................................................................... 3 Common principles .............................................................................................................................. 3 Tekla.Structures.dll .............................................................................................................................. 3 Tekla.Structures.Model.dll ................................................................................................................... 4 Tekla.Structures.Drawings.dll .............................................................................................................. 4 Tekla.Structures.Plugins.dll ................................................................................................................. 4 Tekla.Structures.Analysis.dll ................................................................................................................ 5 Tekla.Structures.Catalogs.dll ............................................................................................................... 5 Tekla.Structures.Datatype.dll ............................................................................................................... 5 Tekla.Structures.Dialog.dll ................................................................................................................... 5 Applications ........................................................................................................................ 7 Introduction .......................................................................................................................................... 7 Getting started ..................................................................................................................................... 7 ApplicationFormBase ........................................................................................................................... 9 Plug-ins .............................................................................................................................. 13 Introduction ........................................................................................................................................ 13 Basic steps for creating a plug-in ....................................................................................................... 13 Model plug-ins ................................................................................................................................... 14 ii TEKLA OPEN API DEVELOPER'S GUIDE Contents Mandatory fields in the model plug-in ...................................................................................... 14 Dialog design with Windows Forms ......................................................................................... 14 Dialog design with INP ............................................................................................................ 19 Adding a thumbnail image ....................................................................................................... 20 Special notices and reminders................................................................................................. 20 A step-by-step example ........................................................................................................... 20 Drawing plug-ins ................................................................................................................................ 22 Mandatory fields in the drawing plug-in ................................................................................... 23 Dialog design with Windows Forms ......................................................................................... 23 Adding a drawing plug-in to Tekla Structures .......................................................................... 24 A step-by-step example ........................................................................................................... 24 Notes for using Tekla Open API ...................................................................................... 29 TransformationPlane class ...................................................................................................... 29 MatrixFactory class .................................................................................................................. 29 CoordinateSystem class .......................................................................................................... 30 Point class ............................................................................................................................... 30 Offset class .............................................................................................................................. 30 Picker class ............................................................................................................................. 30 Solid class ............................................................................................................................... 31 Changing the work plane example .......................................................................................... 31 Handling exceptions in applications/plugins ............................................................................ 32 User Interface Controls .................................................................................................... 33 Catalog custom controls .......................................................................................................... 34 BoltCatalog .............................................................................................................................. 35 ComponentCatalog .................................................................................................................. 36 Localization of strings ...................................................................................................... 38 Localization of plug-in name in Component Catalog ............................................................... 38 Localization of plug-in or application strings ............................................................................ 39 TEKLA OPEN API DEVELOPER'S GUIDE 1 Introduction Introduction What is Tekla Open API? Interface is a common boundary between two entities. Tekla Structures user interface enables human users to communicate with the software. Tekla’s Open API, Application Programming Interface, facilitates interaction between Tekla Structures and other software. The Tekla Open API, also known as the .NET API, provides an interface for third party applications to interact with model and drawing objects in Tekla Structures. It also allows the creation of plug-ins. The Tekla Open API 20.0 is developed on the Microsoft .NET Framework version 4.0 Full Profile. Where to utilize the Tekla Open API? Tekla Open API can be utilized with variety of tools. Tekla Open API enables users and vendors to for example: Automate routine tasks By recording and running user interface actions it is possible to automate routine tasks such as creating daily reports. With the Tekla Open API you can automate for example the creation of modeling and drawing objects. These creation tools are typically frequently needed in projects and can for instance: Create basic structures to model such as type base hall Insert typical AutoCAD details to drawings based on drawing information Automate creation of dimensions for GA drawing based on model information 2 TEKLA OPEN API DEVELOPER'S GUIDE Introduction Integrate Tekla Structures into your own process, workflow, and software Tekla Open API can be utilized in integration of Tekla Structures to other software. Information can be transferred between Tekla Structures model and drawing database and other software used in your office such as: Office tools A&D MIS & ERP With the API you can for instance get full geometric information for CNC. Develop additional functionality to extend and enhance Tekla Structures It is possible to create tools which will add functionality or information to Tekla Structures through the API such as: RFI (Request for Information) management New connection creator between parts Model check and correction tools Erection and site planning tools Where to find support? Extranet is the Tekla’s channel of supporting .NET developers. From there you can find the Tekla Open API page with downloads section as well as the Open API discussion forum. Start-up package The Start-up package, that can be downloaded from the Extranet’s API page, is a good starting point for learning and developing your first application or plug-in. Open API discussion forum Support in the forum is based on C#. It contains up-to-date information and answers to specific questions about using the API. Besides that forum collects also feature requests and bugs. Before posting your question to the forum it might be useful to use the Search functionality provided by the forum – quite often your question have been answered already. And please do not hesitate to answer yourself if you can be of help to others! Note that the forum is not meant for general questions about .NET and programming, or Microsoft’s or other 3rd party application’s APIs. TEKLA OPEN API DEVELOPER'S GUIDE 3 About Assemblies About Assemblies Introduction Assemblies and reference manual can be found in the folders “nt\bin\plugins”, “nt\bin\dialogs” and “nt\help”, respectively, in each version of Tekla Structures. All assemblies except Tekla.Structures.Plugins are registered to GAC (Global Assembly Cache). Common principles All object classes in the API have common methods for manipulating objects such as: Select() for object selection from database or from interface Insert() for creating new object instance Modify() for modifying object in database or interface Delete() for deleting object from database or interface All object classes in API have been designed with following principles: Object initialization is similar to object creation from user interface of Tekla Structures. As example Beam is initialized by giving two positions in constructor-method. Field naming in object classes follows dialog field names (in English language) as much as possible. Tekla.Structures.dll This assembly contains some basic common types shared by model and drawings. 4 TEKLA OPEN API DEVELOPER'S GUIDE About Assemblies Tekla.Structures.Model.dll Model assembly consists of classes and methods used when connecting and manipulating objects in Tekla Structures model database: Model object classes such as Beam, ContourPlate, BoltArray, Load, Component, etc. Methods to manipulate model objects, including basic object operations like copy, move, combine and split Methods to enumerate model objects Methods such as picking (dynamic selection) and selection of model views Analysis classes for accessing the analysis results database Classes related to clash checking Besides Tekla.Structures.Model namespace this assembly contains sub-namespaces for ClashChecker, Collaboration, History, Operations and UI. Tekla.Structures.Drawings.dll Drawings assemblies are recommended uploads/Ingenierie_Lourd/ developers-guide 3 .pdf
Documents similaires










-
38
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Sep 26, 2022
- Catégorie Heavy Engineering/...
- Langue French
- Taille du fichier 0.9078MB