Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create an offset plane.
planeInput = planes.createInput()
# offsetValue = adsk.core.ValueInput.createByString('10mm')
offsetValue = adsk.core.ValueInput.createByObject(rect.item(3).startSketchPoint)
planeInput.setByOffset(targetComponent.xZConstructionPlane, offsetValue)
planeOne = planes.add(planeInput)
with the createByString it works as intended.
But i would like to use the createByObject, this takes a Base object, and and SketchPoint is a Base object.
when debugging, the offsetValue has isValid = True, so does the planeInput.
yet it gives an invalid expression.
REPEAT Materials panel Error occurred, 3 : invalid expression, An unknonwn error occurred, please validate your inputs and try again:
Traceback (most recent call last):
File "C:\Users/jaco/DEV/FusionAddins/RepeatMaterials\commands\commandCreatePanel\entry.py", line 418, in generatePanel
repeatPanel = createRepeatPanel(panelGeneratorInput, repeatPanelComponent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/jaco/DEV/FusionAddins/RepeatMaterials\lib\repeatUtils\panelGenerator.py", line 66, in createRepeatPanel
planeOne = planes.add(planeInput)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/jaco/AppData/Local/Autodesk/webdeploy/production/06fdec045fd75975b505ab1dcbd568595c1cf626/Api/Python/packages\adsk\fusion.py", line 18091, in add
return _fusion.ConstructionPlanes_add(self, input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 3 : invalid expression
Which is not very helpfull.
Any ideas ?
Solved! Go to Solution.