sketchucation logo sketchucation
    • Login
    βŒ› Sale Ending | 30% Off Profile Builder 4 ends 30th September

    Some possibility-questions on ruby and sketchup

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 2 Posters 544 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.
    • P Offline
      Pout
      last edited by

      Since they pointed me here in het newbie forum...here it goes

      To get started i have some questions:

      • Is it possible to create scenes based upon external data?
        ex.
        I have a dbase with in it a list of names.
        For each name i want to autmatically create a scene with that name.
        Can this be done?
        And in the same way: Is it possible to automatically create 1 page for each scene in Layout?

      • Is it possible to display entity info in some sort of window while mousing over an object? Again this info is stored in a dbase. --> SOLVED, i think this can be done with webdialog.

      • Can colors of an object be different between scenes? Currently it's not in the list of the property-settings that are stored between scenes. --> I have seen that the position of objects can be stored between 2 scenes (proper animation script)

      • Is it possible to display text in the SU window that comes from out of SU? (eg. from a dbase or a txt file)

      I hope these questions make sense and my english is understandable. I'm not looking for a complete script (but if it exsists, why not) but more guidelines on how to do the SU part. I think i already have the communication with the dbase working so now i just need some ruby advise on how to make it work in SU.

      Thx in advance and kind regards,
      Pout

      1 Reply Last reply Reply Quote 0
      • C Offline
        cyin6
        last edited by

        • Is it possible to create scenes based upon external data?
          that depends on the external data format
          it could create scenes automatically (pages.add) if there is code to read/parse the dbase
        • Is it possible to display text in the SU window that comes from out of SU?
          read from a txt file (IO.readlines) > generate display text (entities.add_text)
        1 Reply Last reply Reply Quote 0
        • P Offline
          Pout
          last edited by

          cyin6,

          Great! Both do exactly what i need them to do.

          Regarding the entities.add_text. I would like to place the text on the axis of an object.
          I know how to specify the coordinates where the text must be placed, but i can't find how to get the axis of an Sketchup object, so i can use those coordinates.

          Also is it possible to do an action when the mouse is over an object? The entityObserver only seems to cover Erase and Change

          Thx again πŸ˜„
          (any clue on the automatic generation of a page for each Scene en SU Layout?)

          1 Reply Last reply Reply Quote 0
          • P Offline
            Pout
            last edited by

            can i get the center with point = boundingbox.center ?

            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