<?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: How to perform operations on User Parameters? in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11948693#M3781</link>
    <description>Are there alternative methods for dynamically modifying a sketch created with point3D using slider parameters?</description>
    <pubDate>Mon, 08 May 2023 10:43:39 GMT</pubDate>
    <dc:creator>ph0en1x01</dc:creator>
    <dc:date>2023-05-08T10:43:39Z</dc:date>
    <item>
      <title>How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11933764#M3771</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Width='Width'
widthValue='65.7 cm'
unitsMgr=design.unitsManager
realInputNumber=unitsMgr.evaluateExpression(widthValue,unitsMgr.defaultLengthUnits)
realValueInput=adsk.core.ValueInput.createByReal(realInputNumber)
design.userParameters.add(Width,realValueInput,unitsMgr.defaultLengthUnits,'')
Width = adsk.core.ValueInput.createByString(Width)
multiply=Width*2 #Error
addition=Width+Width #Error&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I get various errors when I directly multiply the variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;My solution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Width2 = design.userParameters.itemByName(Width).value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, in this case, the &lt;/SPAN&gt;Width2&lt;SPAN&gt; value in the 3D model does not change when I adjust the slider in the GUI. Is there a way to dynamically change the &lt;/SPAN&gt;Width&lt;SPAN&gt; value with the slider and still perform operations on it?"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 17:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11933764#M3771</guid>
      <dc:creator>ph0en1x01</dc:creator>
      <dc:date>2023-05-01T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11934108#M3772</link>
      <description>&lt;P&gt;Your code is failing because you are attempting to perform operations on variable types that don't support those operations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At first, the variable "Width" is a string, but then in line 7, you reassign it so it is now a ValueInput object. A ValueInput object doesn't support any mathematical operations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not clear to me what you want to do. Do you want to create a new parameter that uses an existing parameter and has an equation using a mathematical operator? Or do you want to have a variable in your code that uses a parameter and does some math with it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's some code that does the latter.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Get the existing parameter named "Width".
widthParam = design.userParameters.itemByName('Width')

# Get 2 times the width.
multiply = widthParam.value * 2

# Add the value to itself.
add = widthParam.value + widthParam.value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value property of a parameter returns a floating point number that is the value of the parameter in database units. In this case, it's a distance value, so it will be in centimeters.&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 19:04:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11934108#M3772</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2023-05-01T19:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11934212#M3773</link>
      <description>&lt;P&gt;Edited Response:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Width1 = adsk.core.ValueInput.createByString(Width) # Width changes with slider Add-in
Width2 = design.userParameters.itemByName(Width).value # Width doesn't change with slider Add-in GUI&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It seems that the variable Width2 is only initialized once when I first set it to the value of design.userParameters.itemByName(Width).value.&lt;/P&gt;&lt;P&gt;After that, the value of Width2 remains the same even if I change the value of the slider Add-in.&lt;BR /&gt;&lt;BR /&gt;Here is my whole code:&lt;BR /&gt;&lt;STRONG&gt;EV Chassis Code&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://github.com/purushottamnawale/cad-customization-of-ev-chassis/blob/main/Chassis.py" target="_blank" rel="noopener"&gt;https://github.com/purushottamnawale/cad-customization-of-ev-chassis/blob/main/Chassis.py&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Slider Add-in Code:&lt;BR /&gt;&lt;/STRONG&gt;&lt;A href="https://github.com/purushottamnawale/cad-customization-of-ev-chassis/tree/main/Add-in" target="_blank"&gt;https://github.com/purushottamnawale/cad-customization-of-ev-chassis/tree/main/Add-in&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 13:30:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11934212#M3773</guid>
      <dc:creator>ph0en1x01</dc:creator>
      <dc:date>2023-05-06T13:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11935172#M3774</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10570405"&gt;@ph0en1x01&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the link you provided did not have a slider, I was unable to reproduce the situation.&lt;/P&gt;
&lt;P&gt;Instead, I created a simple body using user parameters, and created a sample that allows the parameters to be changed by changing the slider.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk
import adsk.core as core
import adsk.fusion as fusion

_app: core.Application = None
_ui: core.UserInterface = None
_handlers = []

CMD_INFO = {
    'id': 'kantoku_test',
    'name': 'test',
    'tooltip': 'test'
}

_widthSliderIpt: core.FloatSliderCommandInput = None
_widthPrm: fusion.UserParameter = None

class MyCommandCreatedHandler(core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()

    def notify(self, args: core.CommandCreatedEventArgs):
        core.Application.get().log(args.firingEvent.name)
        try:
            global _handlers
            cmd: core.Command = core.Command.cast(args.command)
            inputs: core.CommandInputs = cmd.commandInputs

            # event
            onDestroy = MyCommandDestroyHandler()
            cmd.destroy.add(onDestroy)
            _handlers.append(onDestroy)

            onExecutePreview = MyExecutePreviewHandler()
            cmd.executePreview.add(onExecutePreview)
            _handlers.append(onExecutePreview)

            # inputs
            global _widthPrm
            _widthPrm = create_base_body_with_parameter(
                'Width',
                1,
            )

            global _widthSliderIpt
            _widthSliderIpt = inputs.addFloatSliderCommandInput(
                '_widthSliderIptId',
                'Width',
                _widthPrm.unit,
                0.01,
                100,
                False,
            )
            _widthSliderIpt.valueOne = _widthPrm.value

        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


class MyExecutePreviewHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args: core.CommandEventArgs):

        # update UserParameter
        global _widthPrm, _widthSliderIpt
        _widthPrm.expression = _widthSliderIpt.expressionOne

        core.Application.get().activeViewport.fit()

        args.isValidResult = True


class MyCommandDestroyHandler(core.CommandEventHandler):
    def __init__(self):
        super().__init__()

    def notify(self, args: core.CommandEventArgs):
        core.Application.get().log(args.firingEvent.name)
        adsk.terminate()


def run(context):
    try:
        global _app, _ui
        _app = core.Application.get()
        _ui = _app.userInterface

        cmdDef: core.CommandDefinition = _ui.commandDefinitions.itemById(
            CMD_INFO['id']
        )

        if not cmdDef:
            cmdDef = _ui.commandDefinitions.addButtonDefinition(
                CMD_INFO['id'],
                CMD_INFO['name'],
                CMD_INFO['tooltip']
            )

        global _handlers
        onCommandCreated = MyCommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        _handlers.append(onCommandCreated)

        cmdDef.execute()

        adsk.autoTerminate(False)

    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def create_base_body_with_parameter(
    name: str,
    value: float,
) -&amp;gt; fusion.UserParameter:

    app: core.Application = core.Application.get()
    des: fusion.Design = app.activeProduct

    # create sketch
    root: fusion.Component = des.rootComponent
    skt: fusion.Sketch = root.sketches.add(
        root.yZConstructionPlane
    )

    # create SketchCircle
    circles: fusion.SketchCircles = skt.sketchCurves.sketchCircles
    circles.addByCenterRadius(
        core.Point3D.create(0,0,0),
        5,
    )

    # create UserParameter
    widthPrm: fusion.UserParameter = get_user_parameter(
        name,
        value,
    )

    # create ExtrudeFeature
    extrudeFeats: fusion.ExtrudeFeatures = root.features.extrudeFeatures
    extrudeFeats.addSimple(
        skt.profiles[-1],
        core.ValueInput.createByString(widthPrm.name),
        fusion.FeatureOperations.NewBodyFeatureOperation,
    )

    return widthPrm


def get_user_parameter(
    name: str,
    value: float,
) -&amp;gt; fusion.UserParameter:

    app: core.Application = core.Application.get()
    des: fusion.Design = app.activeProduct

    unitsMgr: core.UnitsManager = des.unitsManager

    prm: fusion.UserParameter = des.userParameters.itemByName(name)

    if prm:
        return prm

    return des.userParameters.add(
        name,
        core.ValueInput.createByReal(value),
        unitsMgr.defaultLengthUnits,
        'test'
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6326589886112w1028h540r944" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6326589886112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6326589886112w1028h540r944');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6326589886112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I think it would be better to practice parametric modeling before the API.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 03:52:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11935172#M3774</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-05-02T03:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11935831#M3775</link>
      <description>&lt;P&gt;Thank you for response,&lt;BR /&gt;but can we perform operations on ValueInput?&lt;BR /&gt;Width2 = adsk.core.ValueInput.createByString(Width)&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 10:48:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11935831#M3775</guid>
      <dc:creator>ph0en1x01</dc:creator>
      <dc:date>2023-05-02T10:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11937525#M3776</link>
      <description>&lt;P&gt;You can't perform operations on a ValueInput, but why would you want to? It's not clear what you want to do. So far, it seems you have a slider and a parameter, but I'm not sure if you want to create a parameter using the value from the slider or edit the value of an existing parameter using the slider, or something else.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 23:10:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11937525#M3776</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2023-05-02T23:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11943848#M3777</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5741855"&gt;@BrianEkins&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3787950"&gt;@kandennti&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Apologies, if my previous responses were unclear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here, I created a body and mirrored it. The width parameter I used, dynamically changes with Command Dialog slider add-in. i.e.,&amp;nbsp;dimension of chassis changes in real time when I use slider add-in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This snippet of chassis script:&lt;/SPAN&gt;&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;# User Parameters
Width='Width'
widthValue='65.7 cm'
newInputName=ui.inputBox("Enter a new User Parameter Name: ", "New User Parameter",Width)
newInputNumber=ui.inputBox("Enter a User Parameter Value: ","New User Parameter",widthValue)
realInputNumber=unitsMgr.evaluateExpression(newInputNumber[0],unitsMgr.defaultLengthUnits)
realValueInput=adsk.core.ValueInput.createByReal(realInputNumber)  value=design.userParameters.add(newInputName[0],realValueInput,unitsMgr.defaultLengthUnits,'')

# Create a Mirror of body
planeInput = planes.createInput()
offsetDistance = adsk.core.ValueInput.createByString(Width)
planeInput.setByOffset(face1, offsetDistance)
plane = planes.add(planeInput)
plane.isLightBulbOn=False
inputEntites = adsk.core.ObjectCollection.create()
inputEntites.add(body1)
mirrorFeatures = features.mirrorFeatures
mirrorInput = mirrorFeatures.createInput(inputEntites, plane)
mirrorFeature = mirrorFeatures.add(mirrorInput)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, if I use the same distance in point3D, it gives an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;EM&gt;TypeError: Wrong number or type of arguments for overloaded function 'Point3D_create'&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;offsetDistance = adsk.core.ValueInput.createByString(Width)
pointA = adsk.core.Point3D.create(-15, -4.3, 0)
pointB = adsk.core.Point3D.create(offsetDistance, -4.3, 0)
lineAB = lines1.addByTwoPoints(pointA, pointB)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;This somewhat worked for me, but it doesn't change the dimensions in real time with slider&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;realInputNumber=unitsMgr.evaluateExpression(newInputNumber[0],unitsMgr.defaultLengthUnits)
pointB = adsk.core.Point3D.create(realInputNumber, -4.3, 0)

# or

Width = design.userParameters.itemByName(Width).value
pointB = adsk.core.Point3D.create(Width, -4.3, 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It seems that the above variable Width is only initialized once when I first set it to the value of design.userParameters.itemByName(Width).value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After that, the value of Width remains the same even if I change the value of the slider Add-in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I want is to change the width dynamically using Point3D using Command Dialog slider add-in in real time. I also want to perform some operations on width in Point3D, like adsk.core.Point3D.create(Width*2, -4.3, 0).&lt;BR /&gt;&lt;BR /&gt;Here is my whole code:&lt;BR /&gt;&lt;STRONG&gt;EV Chassis Code&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://github.com/purushottamnawale/cad-customization-of-ev-chassis/blob/main/Chassis.py" target="_blank" rel="nofollow noopener"&gt;https://github.com/purushottamnawale/cad-customization-of-ev-chassis/blob/main/Chassis.py&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Slider Add-in Code:&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://github.com/purushottamnawale/cad-customization-of-ev-chassis/tree/main/Add-in" target="_blank"&gt;https://github.com/purushottamnawale/cad-customization-of-ev-chassis/tree/main/Add-in&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I have uploaded a GIF where a selected part is supposed to change the dimensions with respect to slider.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 13:29:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11943848#M3777</guid>
      <dc:creator>ph0en1x01</dc:creator>
      <dc:date>2023-05-06T13:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11946000#M3778</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10570405"&gt;@ph0en1x01&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The volume is too large to correct immediately.&lt;/P&gt;
&lt;P&gt;Are the "EV Chassis Code" and "Slider Add-in Code" processed separately?&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 14:15:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11946000#M3778</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-05-06T14:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11946051#M3779</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;The volume is too large to correct immediately.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;The dimensions are large, but the volume changes immediately with the slider due to the mirror command, except for the front bar (as shown in the selected bar in the GIF)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Are the "EV Chassis Code" and "Slider Add-in Code" processed separately?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I'm not sure what you mean exactly, but first I created a script for the chassis, and then I created an add-in for it. After that, I ran the chassis script and then the add-in.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 15:08:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11946051#M3779</guid>
      <dc:creator>ph0en1x01</dc:creator>
      <dc:date>2023-05-06T15:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11946738#M3780</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10570405"&gt;@ph0en1x01&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"pointB" is a Point3D object, but it is not possible to associate parameters with a Point3D object.&lt;BR /&gt;The "pointB" appears on the screen when it is created as an endpoint of "lineAB".&lt;BR /&gt;Therefore, you need to find the endpoint of "lineAB" in order to link it to the slider.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 633px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1211418iDF0FC9993A99A673/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The sketch your script produces is not dimensionally constrained at all, so it may be difficult to locate.&lt;BR /&gt;That is what I meant when I stated "I think it would be better to practice parametric modeling before the API."&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 02:45:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11946738#M3780</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2023-05-07T02:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11948693#M3781</link>
      <description>Are there alternative methods for dynamically modifying a sketch created with point3D using slider parameters?</description>
      <pubDate>Mon, 08 May 2023 10:43:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/11948693#M3781</guid>
      <dc:creator>ph0en1x01</dc:creator>
      <dc:date>2023-05-08T10:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/13021117#M3782</link>
      <description>&lt;P&gt;Is there any chance to save a mathematical Operation of two userparameters as a new parameter to let the user factor sketch dimensions later by these parameters? I want to scale several parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2024 17:56:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/13021117#M3782</guid>
      <dc:creator>joergDVRXK</dc:creator>
      <dc:date>2024-09-14T17:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/13021144#M3783</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you can a write a user parameter's expression making reference to any other user parameters.&lt;/P&gt;&lt;P&gt;Here you have an example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jorge_Jaramillo_0-1726338857735.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1409316iB959BD56FA4918AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Jorge_Jaramillo_0-1726338857735.png" alt="Jorge_Jaramillo_0-1726338857735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can use the new user parameter to dimension a sketch object.&lt;/P&gt;&lt;P&gt;The new user parameter will be updated as long as the dependent are updated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this what you are looking for?&amp;nbsp; Or what kind of mathematical operation do you need?&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>Sat, 14 Sep 2024 18:41:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/13021144#M3783</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2024-09-14T18:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform operations on User Parameters?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/13021178#M3784</link>
      <description>&lt;P&gt;Hi, thank you, I wanted to do this in the api and just found out that it works there over expressions, too like:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;lin&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;lines&lt;/SPAN&gt;&lt;SPAN&gt;.addByTwoPoints(&lt;/SPAN&gt;&lt;SPAN&gt;start&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;end&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;lin_len&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;dims&lt;/SPAN&gt;&lt;SPAN&gt;.addDistanceDimension(&lt;/SPAN&gt;&lt;SPAN&gt;start&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;end&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;adsk&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;core&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Point3D&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;create&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;lin_len&lt;/SPAN&gt;&lt;SPAN&gt;.parameter.expression &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"wurzelfaktor / test"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 14 Sep 2024 19:22:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-perform-operations-on-user-parameters/m-p/13021178#M3784</guid>
      <dc:creator>joergDVRXK</dc:creator>
      <dc:date>2024-09-14T19:22:58Z</dc:date>
    </item>
  </channel>
</rss>

