public PDLength() { System.Type[] selectionType = new System.Type[1]; selectionType.SetValue(typeof(TSM.CustomPart), 0); Model myModel = new Model(); ModelObjectEnumerator allObjects = myModel.GetModelObjectSelector().GetAllObjectsWithType(selectionType); while (allObjects.MoveNext()) { if (allObjects.Current is TSM.CustomPart) { TSM.CustomPart currentComponent = allObjects.Current as TSM.CustomPart; if (currentComponent.Name == "EB_PD") { double curWidth = 0.0; double curLength = 0.0; currentComponent.GetUserProperty("w", ref curWidth); currentComponent.GetUserProperty("L", ref curLength); string newName = "PD" + curWidth.ToString() + " L=" + curLength.ToString(); currentComponent.SetUserProperty("P1a", newName); currentComponent.Modify(); } } } myModel.CommitChanges(); }
public static void Run(Tekla.Technology.Akit.IScript akit) { Model myModel = new Model(); ModelObjectEnumerator selectedObjects = getSelectedObjects(); ArrayList selectedParts = getSelectedBooleans(selectedObjects); foreach (TSM.BooleanPart currentBoolean in selectedParts) { changeCut(currentBoolean); } myModel.CommitChanges(); }
public static void Run(Tekla.Technology.Akit.IScript akit) { Model myModel = new Model(); ScaleToDrawingTitle3.main(); myModel.CommitChanges(); }
public static void Run(Tekla.Technology.Akit.IScript akit) { Model myModel = new Model(); PositionNumberToName.main(); myModel.CommitChanges(); }