Message 1 of 2
Rotated and constrained SketchText can't be updated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Once a SketchText has been rotated and constrained I can't update any of the properties through the API. For example when the script below is ran on the attached file I get "RuntimeError: 2 : InternalValidationError : res".
Am I doing something wrong? Is this a bug? Is there a work around?
import adsk.core, adsk.fusion, adsk.cam, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
sketches = app.activeProduct.rootComponent.sketches
sketch = sketches.itemByName('Sketch1')
text = sketch.sketchTexts[0]
text.fontName = 'Arial'
text.text = 'B'
except:
if ui:
ui.messageBox(f'Failed:\n{traceback.format_exc()}')