🏢 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Make PDF-s with RUBY

    4
    0 Votes
    4 Posts
    310 Views
    Chris FullmerC
    I think it looks very interesting. I don't currently have a need to make pdf's, but now that I know it might be possible, I might try to find reasons Chris
  • Ruby's global nightmare!

    26
    0 Votes
    26 Posts
    1k Views
    M
    jessejames, @jessejames said: Am i moving to quickly for ya? Having written code in Python, Ruby, C#, Java, JavaScript, various dialects of Basic, and C++, probably not. Also, having a CompSci prof in the late '70's always wax on about the elegance of Pascal conditioned me to the large distinction between 'elegant' when finished, vs easy to reach 'finished.' The Python features you’re referring to would be considered simple syntax conventions by most programmers, and, hence, trivial. I'll respond anyway. Namespaces – Lets say I'm working on a real project, and production code will be a minimal set of files. As the code is being created, it's often helpful to have the code being worked on by itself, in a separate IDE container. Once complete, it's moved into another container that has finished code. Often, that IDE container is a file. I don't want the namespace changing if I move code between them. End vs indent – I've written code where there may be a lot of end statements, one after the other. Also, indenting is commonplace today. Hence, it would seem that Python's removal of statements like 'end' would be helpful, even though almost all other languages use them. Conversely, when writing code, I often leave test/debug statements on the left margin as a marker that I can delete them when the code works. I can't do that in Python. I might suggest that you read a few books like 'Design Patterns' by the 'Gang of Four' to get an idea of what the real distinctions are in programming languages. Real distinctions affect whether a framework can be moved/ported to another language, as opposed to simple syntax conventions. I might also suggest that there's plenty of others forums for your concerns. This one is for Ruby used in SketchUp. BTW, I'm ignoring the flame, otherwise we might get into that layman concept... Greg
  • Core ruby policies

    12
    0 Votes
    12 Posts
    446 Views
    C
    @chris fullmer said: There is a good chance they are part of the Dynamic Components. yeah. they are part of dcutils.rbs
  • Find the ObjectID for an array?

    4
    0 Votes
    4 Posts
    8k Views
    Chris FullmerC
    @jim said: 100 references to the same Array, but not 100 arrays. I know, I'm being pedantic. Its ok, its good for me. And is there a difference between .object_id and .id and .id ? And I saw a hint at :name - what is that? I couldn't get it to work. And in your example, what does ||= do? I'm guessing it creates an empty array at [index] if there is not an array there already? Thanks Jim. Chris
  • MIRROR 2d - plugins idea

    10
    0 Votes
    10 Posts
    507 Views
    D
    thanks for your reply
  • Clear the ruby window

    11
    0 Votes
    11 Posts
    451 Views
    Chris FullmerC
    Anyone want to configure Jim's plugin for 64bit? Chris
  • Unit plugin not work in SU 7.1 ?

    17
    0 Votes
    17 Posts
    2k Views
    CadFatherC
    got it Jim, it was something to do with the path to the icons - the ruby console is great but not when you forget its existence, Thanks!
  • How to add components to another component? [ruby]

    6
    0 Votes
    6 Posts
    466 Views
    TIGT
    If you want to 'select' something ... ### Let's assume you have an array [list] of the items to add to the component, called 'list'... ### If you have selection made that has 'raw' faces in it then add those faces' edges too to the list, if those edges then have other faces those faces and edges too - '.all_connected. ??? ### This is what causes bugsplats - when parts of 'connected things' are put into different entities sets... model=Sketchup.active_model selection=model.selection selection.clear selection.add(list) ### OR list.each{|e|selection.add(e)} ### then the code... g=model.active_entities.add_group(selection.to_a) inst=g.to_component inst.name="MyInstancesName" defn=inst.definition defn.name="MyComponentsName" ### check it hasn't incremented; using dname=defn.name; compare dname to "MyComponentsName", e.g. it might now be "MyComponentsName#1" ### etc...
  • I thought I understood groups and components!

    3
    0 Votes
    3 Posts
    181 Views
    TIGT
    It's one of those glitches thet we just work around for now... Make it unique... When it's fixed it won't matter...
  • Iron Ruby?

    7
    0 Votes
    7 Posts
    698 Views
    G
    @cjthompson said: Ruby in Steel just allows you to type .rb files in VS, although I think I misunderstood you. Are you trying to find an IDE to write scripts or are you trying to find a way to connect .NET Applications with Sketchup? First: I would like to use the best IDE for the job. A Good Debugger with the ability to step througb code and hopefully a level of intellisense. VS should provide both. Even if I have to write pseudo modules that mimic the SU API I feel I would be miles ahead of using a text editor. Second: Of course I would like to find a way to drive Sketchup from VS. If it means I can use other VS languages so much the better. If it means I have to learn Ruby in VS... Less desireable from my standpoint but not out of the question. I've been poking around the Iron Ruby forum and it looks like IR is based on the Dot.NET framework and requires it to function. It also appears that Iron Ruby is not really ready for public consumption within VS at this time. They are still working toward version 1.00 Cheers,
  • Notepad++ users: heads up

    12
    0 Votes
    12 Posts
    5k Views
    N
    here is how you do it using TBD's bridge sollution http://forums.sketchucation.com/viewtopic.php?f=169&t=6903#p137855
  • Synchronizing Multiple WebDialogs

    20
    0 Votes
    20 Posts
    2k Views
    chrisglasierC
    @martinrinehart said: If you find a tool that actually lets you step through the states of the browser, it would be invaluable. ... for whom? "This is commercial, for-profit work. At some point there will be a send-me-money feature added. At this point (mid-summer, 2009) that feature does not exist. The whole price right now is feedback. Tell me what works and what's unclear. Major mistakes and minor typos." [source] Free content/editing from feedback seems as bad as free designs from competitions (much despised around here - example).
  • Convert MaxScript to Ruby?

    6
    0 Votes
    6 Posts
    863 Views
    Chris FullmerC
    Awesome, sounds great! Let us know if you need any help with it, Chris
  • Need help with rubies

    4
    0 Votes
    4 Posts
    124 Views
    A
    Its ok I figured it out now, and have them .... now i just need to learn how these work LOL
  • Combining a plgn that uses a class for the def w/other plgns

    3
    0 Votes
    3 Posts
    152 Views
    E
    Thank you. You know in hind sight that makes perfect sense. I guess the whole class in the def thing just though me. I am definitely not a programmer so when I see something I'm not used to seeing it throws me off. Thanks again
  • Ruby to WebDialog Communication

    13
    0 Votes
    13 Posts
    482 Views
    chrisglasierC
    @unknownuser said: The Mac requires a complete <body> section before it will do anything. If your actual body depends on getting data from Ruby, this is a problem. The trick is to have bogus HTML that displays a "Start" button. Call the Ruby when the button is pressed. (And wait for it to call back, as above.){tutorial} This may well be true but the reason I used a start button solution was that cgScenes immediately examines the model for the current scene and list of all, and as I understand there is no **Sketchup.active_model when the Ruby scripts are first loaded. BTW I would question whether the notice " 2009, Martin Rinehart" in "SketchUp Ruby Interface to JavaScript" is appropriate given the contributions of SCF members. ** edited 1400 gmt for clarity
  • How to assign a material to all selected objects (and faces)

    11
    0 Votes
    11 Posts
    5k Views
    thomthomT
    @runnerpack said: Also, some way of showing which material is selected would be handy... (but not in a floating window for obvious reasons ) I could draw the name of the material to the viewport, as well as a sample of the colour (but not texture).
  • How to avoid multiple instances of WebDialog?

    4
    0 Votes
    4 Posts
    173 Views
    chrisglasierC
    @thomthom said: > module MyDialog > > # Use a module variable to store one reference to your dialog > @dialog = UI;;WebDialog.new("Show Google.com", true, > "ShowGoogleDotCom", 739, 641, 150, 150, true); > @dialog.set_url "http://www.google.com" > > def self.show_dialog > # Now you can use that variable to check if it's already visible or not > if @dialog.visible? > @dialog.show > else > @dialog.bring_to_front > end > end > > end > Very good. I know not for me but thanks Chris
  • Export as .JMS?

    4
    0 Votes
    4 Posts
    357 Views
    J
    Sure it's possible. The Ruby API provides very good access to all of the model's geometry and most of it's other data.
  • I need help!

    3
    0 Votes
    3 Posts
    215 Views
    fredo6F
    @birdair said: b) Why some curves lines (ellipses) looks faceted... can fix that little problem... how? You can always take your curve and convert it to FSpline or Cubic Bezier to get more intermediate points (you need first to convert it to a Polyline). But I am not sure it can give always the same best results as to think of the number of segments in the first place when you create the curve, as RunnerPack says. Fredo

Advertisement