sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    How 2 write a script 2 loop group names and move them

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 1 Posters 110 Views 1 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.
    • D Offline
      dawrightau
      last edited by

      Hi

      I need to find or write a script that

      1. loops through all group names that match a alphanumeric string combinations that include a type and distance value,

      2. store that group name in an array

      3. Read the group type value and distance value from the group names that meet a string pattern (ie mid(string,start char,finish char)

      4. Move the matching group by the relevant distance * a factor (ie 1000 mm * 1.5) in the relevant direction according to the group type value

      5. Loop to the next matching group name and repeat until done

      I am v familiar with Sketchup and have some simple vb6 programming experience. I have looked the syntax of some ruby scripts doing move tasks but I cant seem to get past the starting point in writing my own. I would be most grateful for some tips on writing my first script incorporating these steps so I can learn how to write scripts for other automation tasks as well.

      Any suggestions would be much appreciated.

      Regards David

      1 Reply Last reply Reply Quote 0
      • D Offline
        dawrightau
        last edited by

        Hi

        Any tips and suggestions on how to do this are still welcome.

        However as many members are no doubt aware there is a great resource on writing scripts for Sketchup in the 13 Chapter 400+ pages on Automating Sketchup "by Matthew Scarpino at :

        http://www.autosketchup.com/downloads/Automatic_SketchUp.pdf

        This looks like it covers all of the things I set out in this post so here goes.

        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