ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Determine zoom level through API

    5
    0 Votes
    5 Posts
    254 Views
    T
    Thank you thomthom, that is exactly what I was looking for.
  • Is This Lazy?

    2
    0 Votes
    2 Posts
    671 Views
    A
    There will most likely be some performance hit, but it's not likely to be significant. My personal opinion is that if it is reasonable to code the appropriate "if" conditions (like version number), you are better off doing that. For a simple issue like this, probably irrelevant; for more complex code, you'll want to be more careful.
  • WebDialog question

    6
    0 Votes
    6 Posts
    161 Views
    M
    You might want to think about using JSON. It's a bit more general, can be really light weight and if you know JavaScript you already know JSON. Example: JSON array: comma-separated list of items enclosed in square brackets. Sample: ['string one', 'string two'] It's a wee bit of extra work, but if you ever want to share data elsewhere ...
  • Dynamic Component Copies and Transformation

    3
    0 Votes
    3 Posts
    447 Views
    M
    Jon, I don't know much about Ruby, or components. I do know that the "generate report" function of pro version is a ruby script by google, and that it (for the most part) can read this problem. That being said, since this is the weekend and I only have my free version here, take my dynamic flange model (posted in the dynamic components section of these forums), which has multiple, multiple embeded copies as a test model. Run the "generate report" function on that model - I believe it will tell you what the X,Y,Z of each component is - and it will give you the same information as you've been getting. Not much help. So, that's what the attribute dictionary is getting. By searching, however, you can pull out information about the copies function (i.e. copy number). You can also find the formula for X,Y,Z by finding _X_Position_Formula (or something similar). Using the direct formula, you could in theory look for the word "copy" in the Position formula, and find out what X SHOULD BE by doing the math yourself. Not pretty, but that's the only thing I can think of until I play around with my pro version at work.
  • Draw2d

    2
    0 Votes
    2 Posts
    242 Views
    A
    Found it. pushing the middle mouse button invokes the orbit tool. But it also suspends and resumes the currently active tool. By handling the resume method and calling view.invalidate, I can force it to redraw the screen every time the orbit tool finishes and returns to the drawing tool.
  • [question] texture coordinates and projected textures

    6
    0 Votes
    6 Posts
    421 Views
    D
    Excellent, thanks for the info!
  • Global Object Stupidity, Ruby Question

    12
    0 Votes
    12 Posts
    591 Views
    N
    I think this can help to understand modules. Since a few hours ago, I did not had any idea about what modules are. This gave me a clue. I hope others will find it enlighting too. http://www.rubyfleebie.com/an-introduction-to-modules-part-1/
  • Tool Bars Question

    29
    0 Votes
    29 Posts
    3k Views
    EarthMoverE
    I'm with you guys. It's gotten to the point that after the last time I restarted sketchup to find all my toolbars had turned themselves on and cascaded down the screen to the point that no drawing space was even visible, I decided enough was enough and just undocked all my toolbars. I'm losing significant real estate, but it's worth avoiding the frustration. It would be interesting to see if someone could implement a toolbar manager, as I requested here http://forums.sketchucation.com/viewtopic.php?f=180&t=22274 for this type of workflow, as it may solve some headaches for thousands of users.
  • New Profile builder with power tools

    4
    0 Votes
    4 Posts
    994 Views
    Bob JamesB
    No way could I figure out how to download this: I clicked on just about everything.
  • Inputbox dropdown is not scrollable

    3
    0 Votes
    3 Posts
    239 Views
    P
    @tig said: Alternatively use a webdialog - but that's another story... Owkee, thx. That's the path i'll take
  • Didier's MultiWall ruby w/ SU 7+

    4
    0 Votes
    4 Posts
    401 Views
    TIGT
    @prismcnd said: could you show exactly where to insert it into the code for all of us who are not familiar with ruby code I apologise ! I just realised that Didier's script is 'encrypted' - so you can't alter it unless you decrypt it first - I know how to do this [ ] but you shouldn't... Can I suggest you PM Didier and ask him for the fix... I can't really change and reissue someone else's script...
  • I lost my my joint push pull toolset with 7.1

    2
    0 Votes
    2 Posts
    287 Views
    fredo6F
    Do you still have the menu? Things to do are: check the Toolbar visibility Check you have the subfolder JPP_Dir in your Sketchup Plugins folder (it precisely contains the icons) Fredo
  • Can Ruby use multicore?

    8
    0 Votes
    8 Posts
    1k Views
    tbdT
    extension = code in another language brought in Ruby world. for example, my dezip is an extension that brings unzip capabilities to SU Ruby the egg and chicken problem - SU is an extension to Ruby
  • Model.save does not save

    13
    0 Votes
    13 Posts
    2k Views
    Al HartA
    After wrestling with this problem for an hour or two for a routine I am writing to load a .SKP file, change it and resave it, I came up with this solution: Replace \ with / in the file name (save does not seem to like ) Save the current model with a temporary name (in the same folder as the desired final name) Close the current model (You have to close the model so you can modify the .skp file already on disk) Remove the current .skp file (if it exists) Move the temporary file to the desired file (rename()) # routine to save a .SKP file with the same name as the current model # need to save file with a temporary name, close model, then move the temporary name to the real name def resave_file(sfile) # save() does not seem to like back slashes # replace them withforward slashes sfile.gsub!(Regexp.new("\\\\"), '/') printf("sfile; %s\n", sfile) # save to a temporary location first # this assumes the file name ends with .skp (or .SKP) sfile2 = sfile[0, sfile.length - 3] + 'TMP' printf("sfile2; %s\n", sfile2) bret = Sketchup.active_model.save(sfile2) printf("Save file; bret; %s\n", bret) return(bret) if !bret # now move sfile2 to sfile # remove existing file # need to close existing model first Sketchup.file_new if File.exists?(sfile) begin File.unlink(sfile) rescue warn "could not delete file; " + sfile return(false) end end#if bret2 = File.rename(sfile2, sfile) printf("Returning bret2; %s2\n", bret2) return(bret2) end#def If you need to file to still be open after the save, you could open it again. Let me know if it works for you
  • Does this bugsplat for you>

    3
    0 Votes
    3 Posts
    182 Views
    J
    Thanks Martin, but it is the same as using Follow Me on a couple 6-sided "circles" to make a sphere.
  • Ruby help, please.

    2
    0 Votes
    2 Posts
    124 Views
    TIGT
    This will cope with files in a folder or its sub-folders... It avoids the ./.. files... path='C;\MyDir' Dir.foreach(path){|f| if f=='.' or f=='..' ### skip ./.. elsif File.directory?(path+"/"+f) Dir.foreach(path+"/"+f){|ff| if ff=='.' or ff=='..' ### skip ./.. else ###==file inside the sub-folder... ### maybe do stuff to File(path+"/"+f+"/"+ff) ### e.g. "if ff=~/\.txt$/ do this"... pseudo-coded !!! end#if } ### maybe do stuff to Dir(path+"/"+f) else ###==file inside the folder ### maybe do stuff to File(path+"/"+f) end#if }
  • SU 7,1 issue with Scale&Rotate Multiple ruby

    4
    0 Votes
    4 Posts
    259 Views
    scottliningerS
    Hey everyone, If you see bugs with 7.1 and Ruby, please share a detailed post with the following information: Your OS (Mac, XP, Vista, etc.) Exact steps to reproduce A keyword or email that you typed into the bug splat screen Does it happen if you uninstall all other scripts? Thanks,
  • Load Errors - gettingstarted.rb

    6
    0 Votes
    6 Posts
    330 Views
    J
    Heh, I checked my Tools folder, but it never occurred to me that someone would not look in the Tools folder too.
  • What color names are accepted ?

    2
    0 Votes
    2 Posts
    138 Views
    TIGT
    Any of the listed colors http://code.google.com/intl/ro/apis/sketchup/docs/ourdoc/color.html usually typed in lowercase e.g. "red", but you could try the other formats too...
  • Possible to split the viewport??

    3
    0 Votes
    3 Posts
    274 Views
    A
    I do agree to! As a workaround, I showed how to make som scenes with different views and also one with top view with paralle projection.

Advertisement