• Login
sketchucation logo sketchucation
  • Login
⚠️ Attention | Having issues with Sketchucation Tools 5? Report Here

Styles and the Ruby API

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 4 Posters 330 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 31 Jan 2009, 22:54

    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 1 Feb 2009, 08:13

      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 1 Feb 2009, 13:50

        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
        • T Offline
          thomthom
          last edited by 1 Feb 2009, 14:39

          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
          1 / 1
          • First post
            3/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement