- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi folks, I'm trying to read the coordinates for some points in a sketch after the user adjusted their location in the drawing but I'm not really getting the values I expect, so i wrote a little test below which should get the first two points in the first sketch? What i really want is the float values for the x , y , z for these points, any help welcome. Khim
design = g_app.activeProduct
actComp = design.activeComponent
sketchesObj = actComp.
sketch0 = sketchesObj.item(0)
# get the first point in the first sketch
x1 = sketch0.sketchPoints[0].worldGeometry.x
y1 = sketch0.sketchPoints[0].worldGeometry.y
z1 = sketch0.sketchPoints[0].worldGeometry.z
# get the second point in the first sketch
x2 = sketch0.sketchPoints[1].worldGeometry.x
y2 = sketch0.sketchPoints[1].worldGeometry.y
z2 = sketch0.sketchPoints[1].worldGeometry.z
Solved! Go to Solution.