-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathabsatz.py
32 lines (24 loc) · 1.05 KB
/
absatz.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import math
import NXOpen
import NXOpen.Annotations
import NXOpen.Drafting
import NXOpen.Drawings
import NXOpen.MenuBar
def main() :
"""" absatz in die masshilfslinen hinzufuegen """
theSession = NXOpen.Session.GetSession()
workPart = theSession.Parts.Work
displayPart = theSession.Parts.Display
theUI = NXOpen.UI.GetUI()
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "toleranz")
objects1 = [NXOpen.DisplayableObject.Null] * 1
number = theUI.SelectionManager.GetNumSelectedObjects()
for i in range(0,number):
Dimension1 = theUI.SelectionManager.GetSelectedObject(i)
objects1 = Dimension1
editSettingsBuilder1 = workPart.SettingsManager.CreateAnnotationEditSettingsBuilder([objects1])
editSettingsBuilder1.AnnotationStyle.OrdinateStyle.DoglegCreationOption = NXOpen.Annotations.OrdinateDoglegCreationOption.Yes
nXObject1 = editSettingsBuilder1.Commit()
editSettingsBuilder1.Destroy()
if __name__ == '__main__':
main()