JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Dynamically updating the parameter array returned by getParameterDefinitions() ?

    Scheduled Pinned Locked Moved General Discussions
    9 Posts 5 Posters 2.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • udifU Offline
      udif
      last edited by

      Is there a way to dynamically update the parameter window, so I could write a simple GUI that dynamically adds or removes parameters?

      z3devZ hrgdavorH 2 Replies Last reply Reply Quote 0
      • z3devZ Offline
        z3dev @udif
        last edited by

        I was hoping that some other users would provide a few hints, as there have been some custom web applications created.

        Do you have some idea as to what you want to achieve?

        You won’t be able to do any of these specializations using the JSCAD website, as that special handling of parameters.

        1 Reply Last reply Reply Quote 0
        • Antoine GuillaumeA Offline
          Antoine Guillaume
          last edited by

          Hello,
          i have a similar query.
          I develop an application allow to a user add many hole.
          The user specify the number of hole (X) in parameters and i want to show in parameters X times the coordinate of the hold.
          How i add dynamicaly in getParameterDefinitions?

          Thanks

          z3devZ gilboonetG 2 Replies Last reply Reply Quote 0
          • hrgdavorH Offline
            hrgdavor @udif
            last edited by

            @udif perhaps add an issue on git, with examples what you would like to do with parameters, we could discussit there a bit more, and maybe come-up with some ideas.

            This is not something possible right now, so it could be a feature request.

            1 Reply Last reply Reply Quote 0
            • z3devZ Offline
              z3dev @Antoine Guillaume
              last edited by

              @antoine-guillaume welcome

              You can create a custom webpage from the JSCAD components, but there’s a learning curve.

              The website is very specialized, and contains a lot of functionality. For example, passing URL of online designs.

              I think that other users can assist if you provide a few more details on your ideas.

              1 Reply Last reply Reply Quote 0
              • gilboonetG Offline
                gilboonet @Antoine Guillaume
                last edited by

                @antoine-guillaume Hello, you can do whatever you want into getParameterDefinitions() but due to code cinematic you won't be able to use parameters value for that. For scripts that use variable number of parameters, I use text parameters and enter multiple values on them using separators, semi-comma between sets of parameters and comma between values (when some are optional). And at runtime I parse the text parameters (using split()) to get needed data.

                1 Reply Last reply Reply Quote 1
                • Antoine GuillaumeA Offline
                  Antoine Guillaume
                  last edited by Antoine Guillaume

                  Hello, sorry for the delay, I had not seen your messages....
                  The idea is to vary the parameters according to the parameter entered previously.
                  As is, this is not possible due to the getParameterDefinitions function.

                  hrgdavorH 1 Reply Last reply Reply Quote 0
                  • hrgdavorH Offline
                    hrgdavor @Antoine Guillaume
                    last edited by

                    @antoine-guillaume this could be done by adding support for a second function getDynamicParameters where:

                    • firstly getParameterDefinitions is called and a list of basic parameters is generated and remembered
                    • secondly getDynamicParameters is called but with the values from the form and it provides more inputs
                    • on any change to base parameters, getDynamicParameters is called again with changed values to regenerate dynamic list of inputs

                    if there are ppl interested in this feature please open an issue or a discussion where we could define a feature like this. This is something I could implement relatively easy in my new prototype, but is unlikely I would have patience to buid it ony the current jscad web from master branch.
                    https://github.com/jscad/OpenJSCAD.org/discussions/944

                    Antoine GuillaumeA 1 Reply Last reply Reply Quote 0
                    • Antoine GuillaumeA Offline
                      Antoine Guillaume @hrgdavor
                      last edited by

                      @hrgdavor for the moment i have create only one field and i serialize all datas of form and i check the values in the openjscad script

                      1 Reply Last reply Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • First post
                        Last post
                      Powered by NodeBB | Contributors