<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ConstructionPlane offsetValue createByObject error in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13031437#M823</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the offset parameter's description:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jorge_Jaramillo_0-1726764222075.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1411277i0FA002F8FCE7D8CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jorge_Jaramillo_0-1726764222075.png" alt="Jorge_Jaramillo_0-1726764222075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;since it says "distance", I suppose it has to be a float or real value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A ValueInput could be of type boolean, string, real (float) or reference to an object.&amp;nbsp; From these four types the only one that can provide an offset measurement is the real.&lt;/P&gt;&lt;P&gt;It is my assumption, but I could be wrong too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jorge Jaramillo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2024 16:50:39 GMT</pubDate>
    <dc:creator>Jorge_Jaramillo</dc:creator>
    <dc:date>2024-09-19T16:50:39Z</dc:date>
    <item>
      <title>ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13030285#M820</link>
      <description>&lt;P&gt;I am trying to create an offset plane.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        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)    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the createByString it works as intended.&lt;/P&gt;&lt;P&gt;But i would like to use the createByObject, this takes a Base object, and and SketchPoint is a Base object.&lt;/P&gt;&lt;P&gt;when debugging, the offsetValue has isValid = True, so does the planeInput.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yet it gives an invalid expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is not very helpfull.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 08:27:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13030285#M820</guid>
      <dc:creator>jaco_tech</dc:creator>
      <dc:date>2024-09-19T08:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13031158#M821</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To create a plane at a specific offset over a plane, it needs an input which provides a float value.&lt;/P&gt;&lt;P&gt;If you expect to offset the plane to the Y coordinate (I believe so since you're using XZ plane as base plane) of the startSketchPoint, you can do it so:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;offsetValue = adsk.core.ValueInput.createByReal(rect.item(3).startSketchPoint.worldGeometry.y)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand you're expecting to receive the error message in the&amp;nbsp;planeInput.setByOffset() method, but it seems the offset is being validated (that the ValueInput is of type float) in the add() method instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jorge Jaramillo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 15:12:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13031158#M821</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2024-09-19T15:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13031328#M822</link>
      <description>Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;According to the documentation it takes in a ValueInput ... how are we supposed to know that it only accepts a ValueInput 'created by Real' ??&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-a4f85da0-15bd-480e-af9a-d9355ebbad08" target="_blank"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-a4f85da0-15bd-480e-af9a-d9355ebbad08&lt;/A&gt;</description>
      <pubDate>Thu, 19 Sep 2024 16:10:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13031328#M822</guid>
      <dc:creator>jaco_tech</dc:creator>
      <dc:date>2024-09-19T16:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13031437#M823</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the offset parameter's description:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jorge_Jaramillo_0-1726764222075.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1411277i0FA002F8FCE7D8CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jorge_Jaramillo_0-1726764222075.png" alt="Jorge_Jaramillo_0-1726764222075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;since it says "distance", I suppose it has to be a float or real value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A ValueInput could be of type boolean, string, real (float) or reference to an object.&amp;nbsp; From these four types the only one that can provide an offset measurement is the real.&lt;/P&gt;&lt;P&gt;It is my assumption, but I could be wrong too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jorge Jaramillo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 16:50:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13031437#M823</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2024-09-19T16:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13032712#M824</link>
      <description>Hmm, thats indeed a bit confusing. Hope someone from Autodesk can clarify. If that would be the case i would expect there to be a DistanceValueInput object or so ...</description>
      <pubDate>Fri, 20 Sep 2024 07:28:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13032712#M824</guid>
      <dc:creator>jaco_tech</dc:creator>
      <dc:date>2024-09-20T07:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13039797#M825</link>
      <description>&lt;P&gt;The ValueInput object is usually used when you provide a value that will become an expression of a parameter. The offset of a construction plane is a good example. When you interactively create an offset plane, you enter the value in a dialog. You're entering a string that will be used for the parameter expression. If your document units are set to "mm" and you enter "20", the offset will be interpreted as 20 mm. However, it could also be an equation like "Length / 2", and you can specify the units rather than let them default to the document units, so "4 in" would be valid.&amp;nbsp; These are all string inputs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When programming, you more commonly deal with float values when computing sizes, so the API also lets you provide these values as real numbers. When you use real numbers, they're &lt;U&gt;always&lt;/U&gt; assumed to be in the same units that Fusion uses internally. This is cm for lengths and radians for angles. When you provide the value as a real number, Fusion creates a string equivalent it uses for the parameter's expression.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 00:00:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13039797#M825</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2024-09-24T00:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13040169#M826</link>
      <description>I understand the string and float value input. But my inital question was why it does not (seem) to work with an Object ?&lt;BR /&gt;In the UI i often use an OffsetPlane parallel to a reference plane and to an object, a sketch point.&lt;BR /&gt;So that if somehow the sketch point moves due to some parametric changes. This construstionPlane also moves.&lt;BR /&gt;&lt;BR /&gt;Is this way of working supported in the API as well ? Or am I just messing it up in code ?</description>
      <pubDate>Tue, 24 Sep 2024 04:33:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13040169#M826</guid>
      <dc:creator>jaco_tech</dc:creator>
      <dc:date>2024-09-24T04:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13041464#M827</link>
      <description>&lt;P&gt;Maybe you need to use&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;setByTangentAtPoint()&lt;/STRONG&gt;&lt;/EM&gt; method instead of the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;setByOffset()&lt;/STRONG&gt;&lt;/EM&gt; method?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 14:43:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13041464#M827</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2024-09-24T14:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: ConstructionPlane offsetValue createByObject error</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13042623#M828</link>
      <description>&lt;P&gt;When the API for construction planes was initially implemented, Fusion didn't support creating an offset plane through a point. It was added a few years ago, but the API hasn't been updated to support this. I would expect this to be implemented with a new construction method in the API, something like setByOffsetThroughPoint. In short, I don't think what you're trying to do is currently possible.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 21:55:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/constructionplane-offsetvalue-createbyobject-error/m-p/13042623#M828</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2024-09-24T21:55:41Z</dc:date>
    </item>
  </channel>
</rss>

