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

    Styles and the Ruby API

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 4 Posters 325 Views 4 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.
    • M Offline
      mattscar
      last edited by

      Hi all,

      I'd like to create a custom Style object with Ruby, but to invoke add_style, I need an existing *.style file. Is there any way to create one of these files in code? Is there any way to configure settings of an existing Style object?

      The Style class only provides methods for accessing the style's name and description.

      Thanks,

      Matt

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        my guess is that youd have to use a program outside SU to create the .style file, im not sure how accessible the style builder is in terms of accessing it from another program though.

        http://remusrendering.wordpress.com/

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          Many Style settings can be accessed through the RenderingOptions class.

          But, there does not appear to be a way to make a new Style, or make the current Style unique using Ruby. You can (I think) copy a Style to a new file on your computer, and then load it using add_style, and finally use Ruby to make the changes you desire.

          Hi

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            I find this thread of interest as well. I was very puzzled when I wanted to access some style information.

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            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