Message 1 of 2
User select sketch point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can someone explain why I need the "pnt=" line in this code to display the point coordinates in a message box?
And what's the thought behind the cast in that line. And why (pnrEntity.entity) after cast?
It this something that I should fint in the documentation? In that case, where?
@BrianEkins maybe you have a good answer?
app = ask.core.Application.get()
ui = app.userInterface
pntEntity = ui.selectEntity('Select a sketch point', 'SketchPoints')
pnt = adsk.fusion.SketchPoint.cast(pntEntity.entity)
ui.messageBox('x:{0},y:{1},z:{2}'.format(pnt.geometry.x,pnt.geometry.y,pnt.geometry.z))