• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Ruby Code Generator

Scheduled Pinned Locked Moved Developers' Forum
5 Posts 3 Posters 565 Views 3 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.
  • C Offline
    Chris88
    last edited by Chris88 9 Nov 2011, 13:47

    Hey,
    is there someone, who knows how to code a ruby-code-generator in C#?
    Probably with ironruby in visual studio..

    Because i need a code generator in C#, which generate
    ruby-code, which it can execute in sketchup.

    Thanks.

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 9 Nov 2011, 16:02

      Why do you need this contraption? And how much code do you need to generate? I don't know much about "code generators" in general, but this sounds odd.

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 Reply Last reply Reply Quote 0
      • C Offline
        Chris88
        last edited by 9 Nov 2011, 16:41

        ok, i think i need to explain it in more detail:

        my C#-programm read a lot of XML-documents (which it could transform to TXT with XSLT), on the basis of these values my programm should generate many ruby-files, which will be executed in SketchUp.

        If i code the ruby-files by hand, one ruby-file have ca. 2000-5000 lines (and i need many ruby-files), so it's more comfortable to generate the code. (it's a query, whether values exists in the XML/TXT or not -> a lot of if's)

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 9 Nov 2011, 22:25

          1) You would not use "a lot of if's", instead you would use a looping block statement of some kind in Ruby.

          2) It makes more sense, to use the XML and XSD library files from the Standard Ruby Library. (You need a full Ruby install to have the Standard library files.)

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 9 Nov 2011, 22:33

            And I see you just joined SCF, so I'll assume your new to Ruby... see:
            Ruby Newbie's Guide to Getting Started

            Get the CHM Ruby Reference, as instructed in the Guide...

            Get the full Ruby installer:
            Ruby (v1.8.6-p287) Windows One-Click Installer

            Get the !loadpaths.rb script (so you can access standard Ruby lib files):
            [Code] Ruby LOAD PATHs script (Win32) (Dan Rathbun / Jim Foltz)

            I'm not here much anymore.

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

            Advertisement