Message 1 of 2
Moving a sketch dimension with the Fusion API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I would like to create an addin that let's me snap a dimension to the grid.
The problem is that Fusion 360 is crashing when I am trying to set SketchDimension.textPosition. Setting textPosition.x or moving the textPosition with textPosition.translateBy does not crash Fusion but also doesn't change the position of the dimension.
The code that is crashing Fusion is the following (I've attached the complete code of the addin).
from adsk.core import *
from adsk.fusion import *
app = Application.get()
ui = app.userInterface
selections = ui.activeSelections
for i in range(0, selections.count):
selection = selections.item(i)
dimension = selection.entity
if isinstance(dimension, SketchDimension):
dimension.textPosition = Point3D(10, 10, 10)
Is there anything I am doing wrong or is this a bug in Fusion?