sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Selection order

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 193 Views 2 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.
    • ppoublanP Offline
      ppoublan
      last edited by

      Dear all,
      Is there a way, within a script, when iterating all objects into model.selection to retrieve the order they have been put into it ?
      It looks like the index of selection array is not necessarily the order objects have been selected.
      Sorry if it has already been discussed here, I looked into the forum but did not find clear answer to this question.
      Yours
      Pascal

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        The native 'select' tool will often return its array in the order of picking, BUT this is not guaranteed, and of course if you pick a curve, then all of its edges are added in the curves edges' order...
        You can make a Tool class... where the selection is initially cleared and the user is prompted to select things - these can be added to the model.selection, and also in that case each selected object can be pushed into your own array, so you can be sure of the order of that array's order of picking...

        What is it exactly your seek to achieve ?

        TIG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement