teklaopenapi releasenotes 17

12
Tekla ® Open API Release Notes Tekla Structures 17.0 February 2011 Copyright © 2011 Tekla Corporation

Upload: poumpa

Post on 24-Oct-2014

462 views

Category:

Documents


13 download

TRANSCRIPT

Page 1: TeklaOpenAPI Releasenotes 17

Tekla® Open API Release Notes

Tekla Structures 17.0 February 2011

Copyright © 2011 Tekla Corporation

Page 2: TeklaOpenAPI Releasenotes 17

© 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 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.

Page 3: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES i Contents

Contents

1 Introduction .................................................................................................................... 1

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

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

Page 4: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 1 Introduction

1 Introduction

This document describes the new or changed functionality of the Open API, released in Tekla Structures 17.0. Please refer to the API reference manual “TeklaOpenAPI_Reference.chm” for more information.

2 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 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

Reference manual

Goal

The scope

Page 5: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 2 New or Changed Functionality in 17.0

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

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>

2.2 .NET Framework 4.0 and other general changes

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.

What does it mean in practice?

How is compatibility achieved?

.NET Framework 4.0

API architecture clarified

Page 6: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 3 New or Changed Functionality in 17.0

A RemotingException is now thrown if the remote connection to Tekla Structures fails. The log file “dotlog.txt” doesn’t 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 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

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)

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

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.

Remoting exception thrown

Logging

GetAngleBetween method improved

UDAs can be added to a plug-in

Plug-in symbol added

Max 10 input definitions

Fields changed to properties

Obsolete constructor removed

Obsolete methods removed

Page 7: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 4 New or Changed Functionality in 17.0

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; }

}

The maximum number of InputItems in ComponentInput is 10. 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();

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.

PickFace added

ComponentInput implements ICollection

Class for edge chamfers added

Insert, delete and get phases

Display prompt

Checking numbering

Page 8: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 5 New or Changed Functionality in 17.0

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) }); 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. 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. 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 - Creates a new clip plane to the view. Delete - Deletes a clip plane from the view.

Return value of rebar group splitting changed

Fetching objects by type

Exceptions improved

Stitched weld

Question and warning dialogs removed

Class property added to components

Seams without secondaries

Getting objects by bounding box changed

ProjectInfo improved

Clip plane support added

Page 9: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 6 New or Changed Functionality in 17.0

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. 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) 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.

2.6 Tekla.Structures.Drawing 17.0.0.0 Assembly

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

ModelHistory class changed

Beam.Type added

Other fixes

Obsolete constructor removed

Page 10: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 7 New or Changed Functionality in 17.0

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.

2.7 Tekla.Structures.Datatypes 17.0.0.0 Assembly

The Distance.Parse method now supports CurrentCulture and InvariantCulture.

2.8 Tekla.Structures.Dialog 17.0.0.0 Assembly

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

The method CreateRemotingChannel in the CatalogHandler class has been removed.

Obsolete AttributeFile property removed

Including part count in the tag

Class for linking dimension lines added

Filtering by ReinforcementBase

Other fixes

Parsing distances improved

AutoDefaults supported

Fixes

Method removed

Page 11: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 8 New or Changed Functionality in 17.0

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

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. It is now possible to set and get the active analysis model, and to modify the analysis model content. Methods: GetActiveModel - Gets the currently active model. SetActiveModel - Sets the active model. AddPart - Adds a (physical) part to the analysis model. RemovePart - Removes a (physical) part from the analysis model. AddLoad - Adds a load to the analysis model.

Getting profile names faster

RebarItem improved

MeshItem improved

Normal folder search order

Obsolete constructor removed

AnalysisModel class fixes

AnalysisModelHandler class added

Page 12: TeklaOpenAPI Releasenotes 17

TEKLA® OPEN API RELEASE NOTES 9 New or Changed Functionality in 17.0

RemoveLoad - Removes a load from the analysis model.