sketchucation logo sketchucation
    • Login
    1. Home
    2. glro
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    G
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 29
    • Posts 403
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Need experienced SketchUp dev. testers.

      @farazforoozan said:

      This is a brief manual if you're interested.

      http://sketchucation.com/forums/viewtopic.php?f=323&p=459125#p459125

      would it be convenient to enlarge the use of the plugin to openoffice spreadsheets?

      posted in Plugins
      G
      glro
    • RE: Win32api.so

      @wpjensen said:

      Hi All,

      Where does Win32api.so supposed to reside ??

      I have the files

      I am trying to load Rubytoolbar.rb

      This is the error message I am getting:-

      Error Loading File D:/Program Files/SketchUp 8/Plugins/rubytoolbar/rubytoolbar.rb
      no such file to load -- Win32APIError Loading File rubytoolbar.rb
      no such file to load -- Win32API

      Using Win7 Ultimate

      Wayne

      i have win32api.so in the plugin folder of sketchup, and Rubytoolbar is working normally

      posted in Plugins
      G
      glro
    • RE: Move, Copy, Rotate

      @zigfoyer said:

      There used to be a free RPG plugin that would let you move, rotate, or copy something or a single axis by a specified amount you typed into the plugin window. I can't find the thing on their website any more except as part of a larger package you can buy.

      Are there any other similar plugins? Never understood why Sketchup didn't just add this functionality.

      maybe this one written by Jim FOLTZ?

      http://sketchuptips.blogspot.com.es/2007/08/plugin-mover-2.html

      posted in Plugins
      G
      glro
    • RE: Selective component explode

      @jim said:

      Geo - make certain the Outliner window is closed, and try again. Then disable that SketchStruct plugin and try again.

      you solved my problem !

      I deleted sketchtruct and both TIG and Chris did the job in a few seconds...

      How did you guess it was coming from sketchtruct?

      This shows how much your "plugins quarantine" idea may help to solve plugin problems...

      Thank you

      posted in Developers' Forum
      G
      glro
    • RE: Selective component explode

      @chris fullmer said:

      The model you provided, is that the whole model that you are working with or just a portion? The first code I posted completed in 2 seconds on that model, so I'm hoping that is only a small portion of a much larger model?

      no, it is the whole model

      the problem must be with my computer

      i shall try to find out

      posted in Developers' Forum
      G
      glro
    • RE: Selective component explode

      this is what i typed in the ruby console

      n='KLC1-';m=Sketchup.active_model;m.start_operation('x',true);m.definitions[n].instances.each{|i|i.explode};m.commit_operation;
      

      it does make a loop...

      this a shot of the ruby console, but it never ended, i had to force sketchup out


      loop

      posted in Developers' Forum
      G
      glro
    • RE: Selective component explode

      @dan rathbun said:

      @glro said:

      e.definition.name=="**KLC2-**"

      Is " **KLC2-**" a prefix that appears at the beginning of several definition names ??

      If so your logical test needs to use a regular expression, thus:

      if e.definition.name =~ /\A(KLC2\-)/

      ... which returns nil if there is no match, (and evals to false,) ... or if there is a match, it returns the zero based index of the match (which evals as true.)

      The pattern \A matches the at the beginning of the string only, so in this case the only valid index position that can be returned (for a match,) is 0.

      💭

      the component name in the example is KLC1-, it is not a prefix; just to make the difference with KLC1; the component embedded in it

      posted in Developers' Forum
      G
      glro
    • RE: Selective component explode

      @tig said:

      I'd approach it differently...

      n='KLC2-';m=Sketchup.active_model;m.start_operation('x',true);m.definitions[n].instances.each{|i|i.explode};m.commit_operation;
      

      This one-liner, copy/pasted+<enter> in the Ruby Console explodes all instances of the component definition that is named 'n', it's one step undo-able... It will explode locked instances too - to avoid that use i.explode unless i.locked? instead... If there is no matching definition named 'n' you get an error message... It ignores all other definitions and instances so will be as quick as it can.

      When exploding a container the length of time it takes depends on the number of objects in it AND in its context, since Sketchup has to decide about intersections etc with all of them mixed together...

      i copy/pasted the code.

      It seemed to give a result, lines were scrolling in the ruby window
      but it never ended, i had to force sketchup to stop

      maybe i got something wrong somewhere...

      thank you anyway for trying

      posted in Developers' Forum
      G
      glro
    • RE: Selective component explode

      @chris fullmer said:

      Try that and let us know how it goes,
      Chris

      Sorry for the delay

      here is the model

      the component to explode is named KLC1-

      it contains KLC1 (that's why i need to explode it)

      i tried the code you suggested

      it doesn't help on my computer (it freezes the computer)

      exploding components seems to be a dangerous pratice in sketchup


      selective component explosion

      posted in Developers' Forum
      G
      glro
    • RE: Selective component explode

      @chris fullmer said:

      Well, what do you mean by "a very long time"? Is it a second, or is it 2 hours?

      about 3 or 4 minuts
      i tried your solution, and it is also about 3 or 4 minuts
      i'll be patient...

      thank you for the idea

      posted in Developers' Forum
      G
      glro
    • Selective component explode

      i get partial succes, or it takes a very long time for the computer to process this code:

      <span class="syntaxdefault">model&nbsp;</span><span class="syntaxkeyword">=&nbsp;</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model&nbsp;</span><span class="syntaxcomment">#&nbsp;Open&nbsp;model<br /></span><span class="syntaxdefault">entities&nbsp;</span><span class="syntaxkeyword">=&nbsp;</span><span class="syntaxdefault">model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">entities&nbsp;</span><span class="syntaxcomment">#&nbsp;All&nbsp;entities&nbsp;in&nbsp;model<br /></span><span class="syntaxdefault">entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">to_a<br /></span><span class="syntaxkeyword">for&nbsp;</span><span class="syntaxdefault">e&nbsp;in&nbsp;entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">to_a<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="syntaxkeyword">if&nbsp;</span><span class="syntaxdefault">e</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">is_a</span><span class="syntaxkeyword">?&nbsp;</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">ComponentInstance&nbsp;</span><span class="syntaxkeyword">and&nbsp;</span><span class="syntaxdefault">e</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">definition</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">name</span><span class="syntaxkeyword">==</span><span class="syntaxstring">"KLC2-"<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="syntaxdefault">e</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">explode<br />&nbsp;&nbsp;&nbsp;&nbsp;end<br />end</span>
      

      the model contains 43 component definitions and 976 instances.

      Do you find it normal?

      Is there a another way to write the code to speed the process?

      posted in Developers' Forum
      G
      glro
    • RE: [plugin] Structural analysis - SketchStruct: 30 Oct 12: v201

      @target2427 said:

      Ok, it looks like the two plugins are incompatible at the moment. SketchStruct uses a couple of minor functions for numbering the edges, this is done as the lines are drawn by the user.

      This is a simple function which probably be included in your plugin to allow the two plugins to work together.

      If you want more info on how the numbering works, I will be happy to help.

      Tom

      The plugin i am working on doesn't use any numbering for edges; it is probably done automatically by sketchup

      It seems to me that it would be an enhancement for your plugin to be able to number edges of an existing drawing; this way the user could store models and re-use them

      Anyway, this is how usual structural analysis softwares work

      Thank you for your answer

      posted in Plugins
      G
      glro
    • RE: [plugin] Structural analysis - SketchStruct: 30 Oct 12: v201

      @target2427 said:

      Did you first draw your structure with SketchStruct installed?

      and

      Did you draw the structure manually, line by line?

      Yes to the first question

      No to the second

      I had it drawn automatically by another plugin i am working on, that makes a model of a scaffolding

      From this model, i kept only the axis line and applied to it loads, supports, material and geometric values.

      I didn't guess it would make a difference with a structure drawn from scratch


      file 1

      posted in Plugins
      G
      glro
    • RE: [plugin] Structural analysis - SketchStruct: 30 Oct 12: v201

      I tried again the link and yes, now it is the last version

      I tried a few times and it worked as expected; sometimes it didn't though

      once i got this error message:

      "Error: #<NoMethodError: undefined method []' for nil:NilClass> C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/read.rb:231:in get_nodal_loads'
      C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/read.rb:230:in each' C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/read.rb:230:in get_nodal_loads'
      C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/read.rb:11:in initialize' C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/main.rb:66:in new'
      C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/main.rb:66
      C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/read.rb:231:in `call'
      C:/Archivos de programa/Google/Google SketchUp 8/Plugins/SketchStruct2/read.rb:231"

      With another example, the program gave a result, but in the ruby box, it wrote
      "no. joints: 4
      no. bars: 3
      no. restraints: 4
      DOF: 8
      Maxwell's number: 1
      Errror, mechanism forming
      no. degrees of freedom: 8"

      Obviously, there is still a lot of work to do to make it a usable tool, but i like very much having it in the sketchup environment


      sketchup trial


      second trial

      posted in Plugins
      G
      glro
    • RE: [plugin] Structural analysis - SketchStruct: 30 Oct 12: v201

      @target2427 said:

      Changelog
      v2.0.1 - Added confirmation when choosing materials, now using .rbz install method

      Cheers

      don't know why: version 2.0.0 is downloaded following the link

      and when y try, the ruby box says

      Error: #<NoMethodError: undefined method []' for nil:NilClass> C:/PROGRA~2/Google/GOOGLE~3/Plugins/SketchStruct2.0.0/stiffness.rb:815:in member_load'
      C:/PROGRA~2/Google/GOOGLE~3/Plugins/SketchStruct2.0.0/stiffness.rb:813:in each' C:/PROGRA~2/Google/GOOGLE~3/Plugins/SketchStruct2.0.0/stiffness.rb:813:in member_load'
      C:/PROGRA~2/Google/GOOGLE~3/Plugins/SketchStruct2.0.0/stiffness.rb:858:in main' C:/PROGRA~2/Google/GOOGLE~3/Plugins/SketchStruct2.0.0/main.rb:98 C:/PROGRA~2/Google/GOOGLE~3/Plugins/SketchStruct2.0.0/stiffness.rb:815:in call'
      C:/PROGRA~2/Google/GOOGLE~3/Plugins/SketchStruct2.0.0/stiffness.rb:815

      no outputs are shown, only inputs

      apart from that, it is a nice idea, wish it comes through

      posted in Plugins
      G
      glro
    • RE: [Plugin] Export Batch DAE

      @tig said:

      I expect that the prompt is a device to get the view zoomed before doing the export, otherwise you might find it's exported before the zoom is finished ?

      yes

      maybe a timer would be enough, so it would not be necessary to wait and click for each file

      posted in Plugins
      G
      glro
    • RE: [Plugin] Snapshot – (1.0.1) — updated 09.10.2012

      i posted a message with some code related to your plugin ae snapshot.rb

      http://sketchucation.com/forums/viewtopic.php?f=323&t=39304&p=436887#p436887

      your plugin creates automatically a thumbnail and file shortcut to the model that is being created

      what i needed was the same functions, but for already existing models

      In the batch procedure i adapted from JF's code, the skp file is saved, and this triggers automatically aesnapshot.rb and creates the files in the specified folder

      when looking for a model, you just have to go to this folder

      Now, it is not completely finished:

      the prompt between each files is not convenient
      would be better to look for skp files in all subfolders too...

      i am working on it

      posted in Plugins
      G
      glro
    • RE: [Plugin] Export Batch DAE

      @tig said:

      Of course... with the right code... 😒

      OK... i'll keep working on it then.

      My question is linked to ae snapshot plugin, when it is used to collect informations about all skp files on the hard drive, create a thumbnail and a file shortcut in a specified folder.

      I adapted Jim FOLTZ's code to open each skp file in a folder, zoom out and save, so when it is saved, aesnapshot creates automatically the thumbnail and the file shortcut

      
      model = Sketchup.active_model # Open model
      entities = model.entities # All entities in model
      selection = model.selection # Current selection
      
      
      #choose a file
      skppath = UI.openpanel "choose a file","*.skp"
      skppath = File.dirname(skppath)
      skppath = skppath.tr("\\","/")
      skppath = skppath + "/"
      	  
      #skppath ="C;/recap_skp/"
      #open dir and loop all skps
      dir = Dir.open(skppath)
      begin
        dir.each {|x|
             next if x !~ /\.skp$/i
             x = "#{x}"
             sourcefile = skppath+x
             x = x[0,x.length-4]
      
      #prompt between files
              prompt2 = UI.messagebox("registering #{sourcefile} ?",MB_OKCANCEL) 
      			if prompt2 ==2
      			fail
      			end
       
                    #open model file                 
             Sketchup.file_new
               status = Sketchup.open_file sourcefile
      
            #zoom out
      
            view = Sketchup.active_model.active_view
             new_view = view.zoom_extents
            #save
            status = model.save sourcefile 
         
          }
            
      ensure
        dir.close
      end
      
          UI.messagebox "Finished"
      	
      
      

      I am not sure about the necessity of the prompt between the files register

      posted in Plugins
      G
      glro
    • RE: [Plugin] Export Batch DAE

      @tig said:

      ...
      Select one SKP from a folder of SKPs to be exported, then OK.

      would it be possible to export all skp files in a folder AND subfolders?

      posted in Plugins
      G
      glro
    • RE: [Plugin] Snapshot – (1.0.1) — updated 09.10.2012

      hi

      I typed "C:/Archivos de programa/Google/ SketchUp 8/Plugins/iConEdit/logo_images/site_logo.png" in the "add/edit image" URL dialogue box

      i got this


      iconeditor 05 html.jpg

      posted in Plugins
      G
      glro
    • 1
    • 2
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 16 / 21