Anda di halaman 1dari 12

Tekla Open API

Release Notes

Tekla Structures 17.0 February 2011


Copyright 2011 Tekla Corporation

2011 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 Softwares 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.

Contents

1 2

Introduction .................................................................................................................... 1 New or Changed Functionality in 17.0 ........................................................................ 1


2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 Model API content frozen .............................................................................................................. 1 .NET Framework 4.0 and other general changes......................................................................... 2 Tekla.Structures 17.0.0.0 Assembly ............................................................................................. 3 Tekla.Structures.Plugins 17.0.0.0 Assembly ................................................................................ 3 Tekla.Structures.Model 17.0.0.0 Assembly .................................................................................. 3 Tekla.Structures.Drawing 17.0.0.0 Assembly ............................................................................... 6 Tekla.Structures.Datatypes 17.0.0.0 Assembly............................................................................ 7 Tekla.Structures.Dialog 17.0.0.0 Assembly .................................................................................. 7 Tekla.Structures.Catalogs 17.0.0.0 Assembly.............................................................................. 7 Tekla.Structures.Analysis 17.0.0.0 Assembly............................................................................... 8

TEKLA OPEN API RELEASE NOTES Contents

Introduction

This document describes the new or changed functionality of the Open API, released in Tekla Structures 17.0.
Reference manual

Please refer to the API reference manual TeklaOpenAPI_Reference.chm for more information.

New or Changed Functionality in 17.0

This chapter describes the new or changed functionality in Tekla Structures 17.0.

2.1 Model API content frozen


Goal

The goal of the API content freeze is that modeling applications and plug-ins will then work with future Tekla Structures versions without recompilation. The freezing is valid until compatibility is broken due to a mandatory reason such as upgrading the API assemblies to a newer .NET framework version. The API content freeze concerns the following assemblies in the API: Tekla.Structures.dll Tekla.Structures.Model.dll

The scope

TEKLA OPEN API RELEASE NOTES Introduction

Tekls.Structures.Plugins.dll Tekla.Structures.Dialog.dll Tekla.Structures.Datatype.dll


What does it mean in practice?

In practice, the freezing means that the public properties and methods of public classes in 17.0 will not change with future versions in the above assemblies. However, new classes or new properties or methods to existing classes can still be added. Compatibility will be handled using configuration files. For plug-ins this happens automatically, but for applications the bindingRedirect element must be added to the application configuration file (app.config). For example:
<dependentAssembly> <assemblyIdentity name="Tekla.Structures publicKeyToken="2f04dbe497b71114 culture="neutral" /> <bindingRedirect oldVersion=17.0.0.0 newVersion=18.0.0.0"/> </dependentAssembly>

How is compatibility achieved?

2.2 .NET Framework 4.0 and other general changes


.NET Framework 4.0

Tekla Open API now uses the .NET Framework version 4.0. Obsolete methods and constructors (listed later in this document) have been removed. Dependencies between assemblies have been reduced. Now it is easier to implement a drawing application without using the Tekla.Structures.Model assembly. The GetAdvancedOption method has been moved from the Tekla.Structures.Model namespace to the Tekla.Structures namespace. A new TeklaStructuresSettings class provides methods to inquire advanced options. The GetSelectedObjects method has been moved from the Tekla.Structures.Model namespace to the Tekla.Structures.Model.UI namespace. The method can now be found from the ModelObjectSelector class. The ModuleManager class has been moved from the Tekla.Structures.Model namespace to the Tekla.Structures namespace. The GetCurrentProgramVersion method has been moved from the Model class in the Tekla.Structures.Model assembly to the TeklaStructuresInfo class in the Tekla.Structures assembly. The AnalysisResult class has been moved from the Model assembly to the Analysis assembly.

API architecture clarified

TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

Remoting exception thrown Logging

A RemotingException is now thrown if the remote connection to Tekla Structures fails. The log file dotlog.txt doesnt exist anymore in the \nt\bin folder. Loaded plug-ins and their assemblies are now written to the Tekla Structures log file.

2.3 Tekla.Structures 17.0.0.0 Assembly


GetAngleBetween method improved

Previously, the GetAngleBetween method in the Vector class worked only with angles bigger than 2.56 degrees; now the tolerance is 0.8 degrees.

2.4 Tekla.Structures.Plugins 17.0.0.0 Assembly


UDAs can be added to a plug-in

The Identifier property has been added to the PluginBase and ConnectionBase classes. The property can be used to store custom properties as UDAs to a plug-in inside the Run method. The symbol is now drawn and visible by default in all model plug-ins with Forms dialogs. For plug-ins with inp dialog definition the symbol visibility can be defined in the inp file by adding the line:
draw(1, 50.0, 50.0, 0.0, 0.0)

Plug-in symbol added

Max 10 input definitions

Maximum number (10) checking has been added for input definitions in the <List>InputDefinition for PluginBase components.

2.5 Tekla.Structures.Model 17.0.0.0 Assembly


Fields changed to properties Obsolete constructor removed

All fields of the Model assembly classes have been changed to properties. The Model constructor with the bool parameter SkipChannelCreation has now been removed (the constructor was marked as obsolete earlier). Use Model() instead. The Open method, which was earlier marked as obsolete, has now been removed. Use methods in Tekla.Structures.Model.Operations instead. The obsolete method SaveAsWebModel has been removed. Use methods in Tekla.Structures.Model.Operations instead.

Obsolete methods removed

TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

PickFace added

The PickFace method returns a PickInput instance that contains the face points and the object. Please see the code example in the PickInput class documentation. The ComponentInput class now implements the ICollection interface. The InputItem class can be used with the PickInput class in face picking. For example:
ComponentInput ComponentSel = C.GetComponentInput(); IEnumerator Enumerator = ComponentSel.GetEnumerator(); while (Enumerator.MoveNext()) { InputItem ObjectInput = Enumerator.Current as InputItem; if (ObjectInput.GetInputType() == InputItem.InputTypeEnum.INPUT_1_OBJECT) { Beam BeamInput = ObjectInput.GetData() as Beam; } }

ComponentInput implements ICollection

The maximum number of InputItems in ComponentInput is 10.


Class for edge chamfers added

The EdgeChamfer class has been added. With the new class you can define how the part edge is chamfered. For example:
Point Point = new Point(0, 0, 0); Point Point2 = new Point(1000, 0, 0); Beam Beam = new Beam(); Beam.StartPoint = Point; Beam.EndPoint = Point2; Beam.Profile.ProfileString = "400*400"; Beam.Finish = "PAINT"; Beam.Insert(); EdgeChamfer EdgeChamfer = new EdgeChamfer(new Point(0, -100, 0), new Point(0, 200, 0)); EdgeChamfer.FirstChamferEndType = EdgeChamfer.ChamferEndTypeEnum.BEVELLED; EdgeChamfer.FirstBevelDimension = 50; EdgeChamfer.Chamfer.X = 20; EdgeChamfer.Chamfer.Y = 20; EdgeChamfer.Father = Beam; EdgeChamfer.Insert();

Insert, delete and get phases

The Insert and Delete methods have been added to the Phase class. The GetPhases method was added to the Model class. The method returns a PhaseCollection instance. Access to the Tekla Structures message panel is now possible by using the DisplayPrompt method in the Operation class. The IsNumberingUpToDate method has been added to the Operation class.

Display prompt

Checking numbering

TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

Return value of rebar group splitting changed

The Split method for rebar groups, located in the Operation class, splits the rebar group and creates a new one in the given position. Earlier the method returned a boolean value, but now the method returns the created RebarGroup instance if the splitting was successful. Now it is possible to fetch objects by their type by using the GetAllObjectsWithType method in the ModelObjectSelector class. For example:
ModelObjectEnumerator myEnum = myModel.GetModelObjectSelector().GetAllObjectsWithType(new System.Type[] { typeof(Part) , typeof(BoltGroup) });

Fetching objects by type

Exceptions improved

The Material and Profile properties need to have some information before inserting/modifying a Part, otherwise an ArgumentException is thrown. An ArgumentNullException has been added to HierarchicObject, Task and HierarchicDefinition constructors.

Stitched weld

Now it is possible to choose the weld technique: stitched weld or not stitched weld. "Intermittent" properties for above and below lines have been removed. Now the weld is considered to be intermittent if the pitch value is greater than zero. The modal dialog "Assembly structure includes weldings or bolts. Delete weldings and bolts?" is not shown anymore when trying to remove or add a part to an assembly. The methods fail if there are workshop welds/bolts. Modal warning dialogs do not appear anymore when combining parts; the warnings are ignored.

Question and warning dialogs removed

Class property added to components Seams without secondaries Getting objects by bounding box changed

The Class property has been added to the Connection, Detail and Seam classes. Seams without any secondaries are now supported. The GetObjectsByBoundingBox method in the ModelObjectSelector class has been changed to work in the current work plane. Earlier, the bounding box axis stayed oriented to the global plane, which caused the method to grab several more objects when trying to set the bounding box to a skew plane. The ProjectInfo class now contains the Info1 and Info2 properties which appear in the Project Properties dialog in Tekla Structures. A new class ClipPlane has been added. The class contains the following methods: Insert Delete - Creates a new clip plane to the view. - Deletes a clip plane from the view.
TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

ProjectInfo improved

Clip plane support added

Modify

- Modifies the clip plane position in the view.

The GetClipPlanes method for getting all the clip planes from the view has been added to the View class. A new class ClipPlaneCollection has also been added.
ModelHistory class changed

The ModelHistory class now supports multiuser models. The class has also been changed to be a static class. The method names have been changed to follow the naming convention in the ModelObjectSelector: GetAllModifiedAfterModStamp -> GetModifiedObjects. The new method names are: GetModifiedObjects(ModificationStamp ModStamp) GetModifiedObjectsWithType(ModificationStamp ModStamp, ModelObject.ModelObjectEnum Enum) Methods to retrieve deleted objects have been added: GetDeletedObjects(ModificationStamp ModStamp) GetDeletedObjectsWithType(ModificationStamp ModStamp, ModelObject.ModelObjectEnum Enum)

Beam.Type added

The Type property has been added to the Beam class for identifying the beam types column, pad footing and strip footing in the selection and creation of beams. In the creation, the Type must be initialized in the constructor. Beams that use the plate profile and are created with components can now be selected correctly. It is now possible to change the number of points a contour plate has. Earlier, the modification of a contour plate failed if the number of points was changed. Now it is possible to select nonparallel tapered curved rebar groups. Earlier, the Object cannot be selected exception was thrown. The PrimaryAxisDirection vector in the Load class is normalized when inserting/modifying Load objects. A new solid creation type (PLANECUTTED) has been added to the Solid class. When the type is used, the solid consists of the raw solid, fittings and cut planes.

Other fixes

2.6 Tekla.Structures.Drawing 17.0.0.0 Assembly


Obsolete constructor removed

The obsolete DrawingHandler constructor with the bool parameter SkipChannelCreation has now been removed (the constructor was marked as obsolete earlier). Use DrawingHandler () instead.

TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

Obsolete AttributeFile property removed

The duplicate attribute file name property has been removed from the View class. The LoadAttributes method in the ViewAttributes class should be used instead. The IncludePartCountInTag property has been added to the StraightDimensionSetAttributes class. A new class DimensionLink has been added. Support for filtering by ReinforcementBase has been added. Changing mark properties caused unwanted free-placing of marks in some cases. This has been fixed. Earlier the attribute file was not loaded correctly on view insertion. This has been fixed.

Including part count in the tag

Class for linking dimension lines added Filtering by ReinforcementBase Other fixes

2.7 Tekla.Structures.Datatypes 17.0.0.0 Assembly


Parsing distances improved

The Distance.Parse method now supports CurrentCulture and InvariantCulture.

2.8 Tekla.Structures.Dialog 17.0.0.0 Assembly


AutoDefaults supported Fixes

AutoDefaults are now supported in plug-in connections with PluginFormBase dialogs. Now the LoadAttributes method works correctly for plug-ins with PluginFormBase dialogs. Profiles with brackets are now written properly in the ProfileSelectionForm. Decimal values are now using dots instead of commas.

2.9 Tekla.Structures.Catalogs 17.0.0.0 Assembly


Method removed

The method CreateRemotingChannel in the CatalogHandler class has been removed.

TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

Getting profile names faster

The SelectInstances property has been added to the ProfileItemEnumerator class. It is now possible to loop through the items, getting their names, without selecting each one of them. This feature is good for cases where only the name is necessary because then the enumeration is faster. The rebar item now includes all the properties available in the catalog such as the actual diameter and weight. The bending radius had a wrong type (string), but it has now been fixed and the type is double. The RebarItem.Select method has been implemented.

RebarItem improved

MeshItem improved

The mesh item property types have now been changed to follow the data types in the mesh catalog. The MeshItem.Select method has been implemented. Units are now returned in millimeters.

Normal folder search order

Rebar and mesh catalogs are now searched for in the model folder, XS_PROJECT, XS_FIRM, and XS_PROFDB.

2.10 Tekla.Structures.Analysis 17.0.0.0 Assembly


Obsolete constructor removed

The Analysis constructor with the bool parameter SkipChannelCreation has now been removed (the constructor was marked as obsolete earlier). Use Analysis() instead. Insert: Refreshes the model and adds the model to the analysis models dialog table. Delete: Removes the model from the analysis models dialog table. Select: Refreshes the model. The enumeration of analysis models does not select the models. Only the model identifier and name are retrieved.

AnalysisModel class fixes

AnalysisModelHandler class added

It is now possible to set and get the active analysis model, and to modify the analysis model content. Methods: GetActiveModel SetActiveModel AddPart RemovePart AddLoad - Gets the currently active model. - Sets the active model. - Adds a (physical) part to the analysis model. - Removes a (physical) part from the analysis model. - Adds a load to the analysis model.
TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

RemoveLoad

- Removes a load from the analysis model.

TEKLA OPEN API RELEASE NOTES New or Changed Functionality in 17.0

Anda mungkin juga menyukai