public static dynamic GetTSObject(StraightDimensionSet dynObject) { if (dynObject is null) { return(null); } return(dynObject.teklaObject); }
public static void Run(Tekla.Technology.Akit.IScript akit) { DrawingHandler myDrawingHandler = new DrawingHandler(); if (myDrawingHandler.GetConnectionStatus()) { DrawingObjectEnumerator selectedObjects = myDrawingHandler.GetDrawingObjectSelector().GetSelected(); while (selectedObjects.MoveNext()) { if (selectedObjects.Current is StraightDimensionSet) { StraightDimensionSet curDimSet = selectedObjects.Current as TSD.StraightDimensionSet; TSD.ContainerElement LUT = curDimSet.Attributes.LeftUpperTag as TSD.ContainerElement; TSD.ContainerElement RUT = curDimSet.Attributes.RightUpperTag as TSD.ContainerElement; curDimSet.Attributes.LeftUpperTag = RUT; curDimSet.Attributes.RightUpperTag = LUT; curDimSet.Modify(); } } } }