Tekla Structures 21.1 Open API Release Notes

Updated: 13 May 2019

This document explains new features, fixes and improvements in Tekla Open API 21.1. For more examples and information, see Tekla Open API Reference Manual for version 21.1. 

Tekla.Structures.21.1.0.0 Assembly

.NET profile picker

The .NET profile picker now handles parametric profiles correctly.

Plugin descriptions in Applications and Components

In the Applications and Components catalog, you can now define a description for plugins. The description is saved in the catalog definition file, and it can be translated. 

Surface treatment

.NET API created extra points to surface treatment if the surfacing polygon had cuts on the exterior boundary. This has now been fixed. 

Zooming to bounding box

Zoom to bounding box works again.

Plugins using WinForm dialogs

Plugins using WinForm dialogs failed to load if native .dll was found from the plugins folder or subfolder. This has now been fixed. 

Returning items

Previously, CatalogHandler::GetShapeItems only returned 100 shapes at the maximum. Now all shapes in the model are returned.

Loading .uel files

The CatalogHandler.ImportCustomComponentItems method now accepts a filename path to load a specific .uel file, in addition to the original folder name path.

Running macros

If a macro file was found from several locations, it was run once for each file. This has now been fixed.

Tekla.Structures.Model 21.1.0.0 Assembly

ModelObject class

The IComparable, IEquatable<ModelObject> interface has been added to the ModelObject class.

Tekla.Structures.Drawings 21.1.0.0 Assembly

Associative notes

Associative notes had an incorrect background color when created with Tekla Open API. This has now been fixed.

Drawing plugins

Non-dependent drawing plugins can now be defined by setting the custom attribute [UpdateMode(UpdateMode.CREATE_ONLY)] to the definition of the plugin. When the plugin is executed and created, the objects can be modified from the object dialog boxes. The plugin instance does not exist anymore after the execution, and therefore the plugin cannot be modified anymore.

Custom line types

The Drawings.Net interface now supports custom line types, where previously only regular line types could be used. This functionality works in the same way as in the Tekla Structures user interface, where you previously found more line types. Now these line types can also be accessed through .NET.
The old code that uses the enum values of LineTypes works as before. The new values can be found using either LineTypes.Custom(Name), where Name stands for the custom line type name, or by using the CustomLineTypeCatalog class.
Note that with this change, some properties may become obsolete. Although you may now continue to use these properties, they may be removed in the future, so we recommend that you make the following changes:

  • DetailMarkAttributes.BoundaryLineType -> DetailMarkAttributes.BoundingLine.Type
  • LinkFrameAttributes.LineType -> LinkFrameAttributes.Line.Type
  • LinkFrameAttributes.Color -> LinkFrameAttributes.Line.Color
  • EmbeddedObjectFrame.LineType -> EmbeddedObjectFrame.Line.Type
  • EmbeddedObjectFrame.Color -> EmbeddedObjectFrame.Line.Color
  • TextFileAttributes.LineType -> TextFileAttributes.Line
  • ReferenceModelAttributes.LineType -> ReferenceModelAttributes.Line.Type
  • ReferenceModelAttributes.Color -> ReferenceModelAttributes.Line.Color

View types

The view type is now available from the View class when you access the read-only ViewType property.
The possible view types:

public enum ViewTypes
{
///The view type is not known.
UnknownViewType = 0,
///Front side view of the part.
Frontview = 1,
///Top side view of the part.
TopView,
///Back side view of the part (view opposite front view).
BackView,
///Bottom side view of the part (view opposite top view).
BottomView,
///End side view of the part.
EndView,
///Section view of the part.
Sectionview,
///Model view of the part.
ModelView,
///Detail view of the part.
DetailView,
/// 3d view of the part.
_3DView,
}

Modifying drawings

In some cases, modifying a drawing through the Drawings.Net interface did not correctly apply the changes to the Layout. This has now been fixed.

Inserting drawing objects

Previously, when you inserted a DwgObject using the Drawings.Net interface, the frame had a different size than when inserting a .dwg file in the Tekla Structures user interface. Now the Drawings.Net interface works in the same way as the Tekla Structures user interface. 

Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.