sketchucation logo sketchucation
    • Login
    1. Home
    2. inteloide
    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!
    ๐Ÿซ› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 13
    • Posts 160
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: [Plugin] Components manager plugin

      @elibjr said:

      Hi Inteloide,
      Wow this looks promising. It reminds me of TIG's Xref tool. I won't be able to try it for a couple days but for a person who uses "offsite" components because I tend to edit them separately, this is like the Xref tool on steroids. Thank you! EB.

      Thank you for these encouragements ! I hope it will works 100% soon.

      Glro : I corrected bugs thank to your PM. Now it works ok on version 1.3.2.
      ACTUALLY, EVERYBODY WHO DOWNLOADED V1.3.1 SHOULD DOWNLOAD V1.3.2, because bug was consequent : the selected element doesn't match the real element in some cases.

      Glro, thank to your sample, I think that the best would be also to have the possibility to collapse all instances in the same list element to reduce the number of lines in the list.
      Maybe something like :
      (4) KPI3
      (6) KPI4
      ...
      instead of ahving 4 times KPI3 and 6 times KPI4.

      => I try to add this function at same time than help file.

      posted in Plugins
      inteloideI
      inteloide
    • RE: [Plugin] Components manager plugin

      Hello Glro,

      It looks like you ran the plugin in SU 2013, in which I didn't try.
      But I tried it and correct the error you had. Please download new version 1.3.1, which now works on SU 2013.
      Thank for keeping me in touch.

      posted in Plugins
      inteloideI
      inteloide
    • RE: [Plugin] Components manager plugin

      Hello Glro,

      I just put another version with the bug corrected.
      Actually, I have shortcut on my computer to skp file, I don't use File/Open from sketchup, and, of course..., ther was a bug Inside the procedure when openning.
      Please try and tells me if it's ok now.

      posted in Plugins
      inteloideI
      inteloide
    • RE: [Plugin] Components manager plugin

      ok, I will try to make a little video (but not today).

      Normally, when you open a model, the widow shoud not be empty. If it's the case, an error has occured. May I ask to run the ruby consol, open a model and send me the consol error (if there is...)
      Also, I insist, for sure on Mac it should not work, as I don't know how Mac filesystem works. If required, I could spend more time on this, if a Mac user help to verify it works.

      For the icons below, from right to left (you can have help with keeping mouse on icon):
      -Update the list (you may try this if your Windows is empty)
      -Select in Sketchup the component selected in the list
      -Change component path to the file
      -Save selected component
      -Upload selected component from file
      -Save all components
      -Upload all components from files
      -Options
      -About

      posted in Plugins
      inteloideI
      inteloide
    • RE: [Plugin] Components manager plugin

      1.2 full version history :

      Version history :

      1.2: Added : New option to show or not groups without sub-components

      Added : Update progress shown in status bar

      Added : Options are saved in model

      Optimized : Delete the global variable for reverse list of definition (not used anymore)

      Optimized : Update automatically the list when changing options

      Corrected : Add EN translation for "Group without name" in liste

      Corrected : When component include groups that mustn't be shown, icons showed a sub-directory

      Corrected : Replace openpanel by savepanel when asking for saving path

      Thank you for your feedbacks.

      posted in Plugins
      inteloideI
      inteloide
    • RE: [Plugin] Components manager plugin

      Just updated with followon corrections :

      Add automatic link between version in "about" prompt and the extension version

      Add french translation in extension description

      Improve component loading, in sub-routing in order to reduce file size

      Make messages with "'" characters, in HTML, works.

      Reduce icons size to 23*23 to fit in same window width, due to "options" added button

      Added options prompt, removed the option menu

      Correct relatif link function error in BGSketchup.rb

      Correct error while saving all definitions

      posted in Plugins
      inteloideI
      inteloide
    • RE: [Plugin] Components manager plugin

      Hello,

      First, I just update the plugin with some bug corrections.

      Secondly, to answer your question :
      The main idea is to be able to update a model if component of the model changed, even if the model directory changed also.
      Take one example :
      I have one drawing saved in "c:\toto\final\test.skp"
      This drawing use one component I saved in "c:\toto\component.skp"
      For some reason I modifed the component, it's easy to update it in SU (just you don't know in SU if component changed or not)
      But if changed also the folder with model and component from "c:\toto" to "d:\tata" (for example I saved it on USB key or on network) ?

      With relative link, it doesn't matter : component is saved in "..\component.skp", so nothing to do with "c:\toto" or "d:\tata".

      The attempt of this plugins is to have a "Layout references manager" like, but also in relative link.

      I hope this is more clear for you, if not, please do not hesitate to reply ๐Ÿ˜„

      posted in Plugins
      inteloideI
      inteloide
    • [Plugin] Components manager plugin

      This is a plugin to manage components in your model
      This plugin could be useful for mechanical system designers and others, who use of a lot of components, and modify components separately from the complete model.

      http://img11.hostingpics.net/pics/835047Componentsmanager.png
      Filter window

      Main functions :

      • Tells you if your model components are up to date (compared with saved files).
      • Allow you to update (upload/save) all components in your model at same time
      • Add relative link (path) to your components (ex : โ€œ..\test.skpโ€ instead of โ€œc:\a\b\c\test.skpโ€) : This allows you to change model location without need to update all link when you want to upload a component.
      • Add possibility to manage revsion level of a component (files like "c:\toto rev 3.skp"). If a higher level is found, it compares/uploads it !

      Install :
      Just add it as an extension or unzip files in Plugins directory

      Tool access :

      • It adds a menu : Plugins/BGSketchup/Component manager
      • It detects also OS language and translates to yours (only English and French support by now, you can freely add a new language by adding it in loclization.rb file. In this case, please send the file ;o) )

      Interface explainations:
      On top : the list of components in your model.

      • Click on one element to see some information on it, at bottom of window.
      • Icons reflect component status :
        -> Blue : not linked to a file
        -> Green : up to date (file = component in model)
        -> Orange : broken link between file and model
        -> Red : not up to date (file <> component in model)
        -> Mauve : Group (added only if there is component inside)
        -> Red triangle in right bottom corner : sub-component(s) present

      Model modification implications :

      • It adds attribute to component with a relative link and modification date of the component
      • It adds observers to model entities to check if something changed.

      Known limitations :

      • It was tried on windows 7 with sketchup 8 Pro and 2013 with internet explorer 11.
      • For Mac users, it should work...or pending, pending full tests.
      • The list is not updating โ€œin real timeโ€. I guess it could slow down the system. Maybe adding an option could be relevant.

      Version history :
      1.14.8 :
      Optimized : Move JQuery folder in root BGSketchup folder, in order to reduce plugin size
      Optimized : Language names now appear fully in Options
      Optimized : Change javascript error message in more accurate details
      Optimized : Some coding correction, thanks to Aerilius

      1.14.7:
      Corrected : Wrap localization in module to avoid interferences
      Corrected : When clicking on a raw object in model, the auto-selection in the list didn't worked anymore (Thanks Ole to saw this bug)
      Corrected : Change one French translation
      Corrected : When openning a new model, the list was not refreshing. Now it will, only if window is shown.
      Optimized : Add Html function to catch errors in javascript (mainly for SU 2014, but also for Safari)

      Thank you for any feedback


      The help file


      Version 1.14.8

      posted in Plugins
      inteloideI
      inteloide
    • RE: Module variable with 'require' problem

      Hi !

      Thank you Dan for your comment, you're right M was include everywhere.
      I have seen in your code that you include A.rb in B.rb, I wanted the opposite, so I tried, the code below
      For 'A.rb' :

      require 'sketchup.rb'
      module M
      	class A
      		require 'B.rb'
      		include M;;I
      		def initialize
      			@@var="123"
      		end
      		def show
      			UI.messagebox( @@var)
      			change
      			UI.messagebox( @@var)
      		end
      	end
      	
      	Mod=A.new
      end #module M
      
      if !file_loaded?(__FILE__) then
      	m = UI.menu("Plugins").add_item("Test")  {M;;Mod.show  }
      end
      
      file_loaded(__FILE__)
      

      For 'B.rb' :

      module M
      	module I
      		@@var=nil
      		def change
      			@@var="321"
      		end
      	end #module I
      end #Module M
      

      Now, the problem is that @@var must be define in B.rb : what about if I need to create a third file which require @@var ? I must declare again the same variable !
      Any solution ? (Because in my plugins, there are a lot of variables used in a lot of sub-programs...
      Any help would be apreciated !

      posted in Developers' Forum
      inteloideI
      inteloide
    • RE: Module variable with 'require' problem

      Thank you TIG, it works !
      Driven, I didn't try your solution, but I want the B file to be part of the module, not outside.

      The full code with TIG's solution :
      Here is the first file (called 'A.rb'):

      
      require 'sketchup.rb'
      module M
      	@@var=nil
      	class A
      		include M
      		def initialize
      			@@var="123"
      		end
      		def show
      			UI.messagebox( @@var)
      			change
      			UI.messagebox( @@var)
      		end
      		require 'B.rb'
      	end
      	
      	Mod=A.new
      end #module
      
      if !file_loaded?(__FILE__) then
      	m = UI.menu("Plugins").add_item("Test")  {M;;Mod.show  }
      end
      
      file_loaded(__FILE__)
      
      

      And here is the second file ('B.rb'):

      include M
      def change
      	@@var="321"
      end
      
      
      posted in Developers' Forum
      inteloideI
      inteloide
    • Module variable with 'require' problem

      Hello !

      I'm developping plugins that become bigger and bigger. Therefore, to make code more readable, I split it in different files, using function 'require'.
      I'm following Thomthom's golden rules ๐Ÿ˜‰ , by using module and then module variable.
      But when in file linked by 'require' I cannot access to module variable anymore !

      Here is a simplified sample to explain :

      Here is the first file (called 'A.rb'):
      [pre:1oz1zcpi]

      require 'sketchup.rb'
      module M
      	class A
      		def initialize
      			@@var="123"
      		end
      		def show
      			UI.messagebox(@@var)
      			change
      			UI.messagebox(@@var)
      		end
      		require 'B.rb'
      	end
      	
      	Mod=A.new
      end #module
      
      if !file_loaded?(__FILE__) then
      	m = UI.menu("Plugins").add_item("Test")  {M;;Mod.show  }
      end
      
      file_loaded(__FILE__)
      

      [/pre:1oz1zcpi]

      And here is the second file ('B.rb'):

      
      def change
      	@@var="321"
      end
      
      

      If you run the code, you will have 2 message boxes with '123'. As change has not been called.
      Now, just replace require 'B.rb' by the code of B.rb (='def change....') and it works ! You have two mesaage boxes, one with '123' the other '321'.
      Actually, @@var is not defined anymore in B.rb ?!

      Does anyone already face this problem ? Thank you for your help !

      posted in Developers' Forum
      inteloideI
      inteloide
    • RE: Launch animation

      Hi,

      I didn't saw your answer but I produced this code...
      I post it for your information...but I will work on your answer

      So, my code, as it is now (please don't blame me using a global variable... ๐Ÿ˜‰ )

      ` class Class_Run_Animation
      def initialize
      puts "Start of animation v1"
      @p=0
      @id=0
      end

      def nextFrame(view)
      if $inteloide_cont==true then
      puts "Go to scene #{@p}"
      pages = Sketchup.active_model.pages

        pages.selected_page = pages[@p]
        if @p<pages.size-1 then
          @p+=1
          @id=UI.start_timer(Sketchup.active_model.options["PageOptions"]["TransitionTime"]+Sketchup.active_model.options["SlideshowOptions"]["SlideTime"], false) { nextFrame(view) }
          return true
        else        
          puts "End of loop"
          return false
        end
      else
        puts "stop animation"
        @id=UI.start_timer(1, false) { nextFrame(view) }
      end
      

      end
      end

      module Inteloide
      def self.start_animation()
      $inteloide_cont=true
      Sketchup.active_model.active_view.animation=Class_Run_Animation.new()
      end
      def self.stop_animation()
      $inteloide_cont=false
      Sketchup.active_model.active_view.animation=nil
      end
      def self.pause_animation()
      $inteloide_cont = !($inteloide_cont)
      puts $bg_cont
      end
      end`

      posted in Plugins
      inteloideI
      inteloide
    • RE: Launch animation

      Maybe it's because I don't understand how sketchup makes the loop for an animation, what's happen after nextframe is called and run ? I'm lost in fact.... ๐Ÿ˜ฎ(

      posted in Plugins
      inteloideI
      inteloide
    • RE: Launch animation

      Well, I'm lost ;o)

      what is the aim of this loop :
      @pages.to_array.each_with_index{|page, i|
      next unless page.name==page.label ### (SKIP)

      what do you put instead of "###" in the code :
      UI.start_timer(@po["TransitionTime"],false){###}
      (I put nextFrame(view) because if not the animation doesn't continue)

      posted in Plugins
      inteloideI
      inteloide
    • RE: Launch animation

      ok, I changed to an animation class, but it still don't stop
      I think the issue comes from the start_timer which start the procedure even if animation is stopped.

      ` class Class_Run_Animation
      def initialize
      puts "Start of animation"
      #show_scene(0)
      @p=0
      end

      def nextFrame(view)
      puts "Go to scene #{@p}"
      pages = Sketchup.active_model.pages
      pages.selected_page = pages[@p]
      if @p<pages.size-1 then
      @p+=1
      id = UI.start_timer(Sketchup.active_model.options["PageOptions"]["TransitionTime"], false) { nextFrame(view) }
      return true
      else
      puts "End of loop"
      return false
      end
      end
      end

      module Inteloide
      def self.start_animation()
      Sketchup.active_model.active_view.animation=Class_Run_Animation.new()
      end
      def self.stop_animation()
      Sketchup.active_model.active_view.animation=nil
      end
      end`

      posted in Plugins
      inteloideI
      inteloide
    • RE: Launch animation

      I'm close to the aim !
      I have 2 issues :
      1-When start the animation it goes to "stop" subrouting but it doesn't stop animation ...?!
      2-When setting view.animation to nil, it' doesn't stop... ?!

      Again your help is welcome !

      class Class_Run_Animation def initialize puts "Start of animation" show_scene(0) end def show_scene(p) puts "Go to scene #{p}" pages = Sketchup.active_model.pages pages.selected_page = pages[p] if p<pages.size-1 then id = UI.start_timer(Sketchup.active_model.options["PageOptions"]["TransitionTime"], false) { show_scene(p+1) } return true else puts "End of loop" return false end end def stop puts "Loop stopped" return false end end

      posted in Plugins
      inteloideI
      inteloide
    • RE: Launch animation

      Thanks TIG for telling me to look at Page API, because I thought it was only a collection (Pages) and not an entity.

      So at the end, the solution I found is the following one :

      def lire_anim (p) model = Sketchup.active_model pages = model.pages pages.selected_page = pages[p] if p<pages.size-1 then id = UI.start_timer(Sketchup.active_model.options["PageOptions"]["TransitionTime"], false) { lire_anim(p+1) } end end

      and to launch : lire_anim(0)

      Now, I need to find a way to stop animation while it's running...

      posted in Plugins
      inteloideI
      inteloide
    • RE: Launch animation

      ok, by changing to :
      @xg=0 if @xg>pages.size-1

      all pages are activated, but without any break between each of them. (it's like it goes directly to the last page). How to implement a break ?
      Also it doesn't loop : when the last page is shown, it stops (doesn't loop). Any reason why ?

      Thanks again.
      I will post my complete plugin when finish. Actually it's based on mover.rb plugin (to move components between pages) but I wanted to add a toolbar to have all tool within on click.

      posted in Plugins
      inteloideI
      inteloide
    • RE: Launch animation

      Hello TIG,

      Thanks for your answer, mainly for the last link, which I didn't read yet.

      But the issue I have is to keep the animation running.
      With my code below, I made a class which show scenes page by page
      But the animation stop when I change the page (pages.selected_page = model.pages[$xg])
      Also I don't know if switch time between pages will be as per value defined in sketchup parameters...

      Any idea, or other way to proceed ?

      class Anima
      def initialize
      $xg = 0
      end

      def nextFrame(view)
      pages = Sketchup.active_model.pages
      model = Sketchup.active_model
      #UI.messagebox $xg
      $xg+=1
      if $xg > pages.count then
      $xg = 0
      end
      pages.selected_page = model.pages[$xg]
      #view=Sketchup.active_model.active_view
      #view.show_frame

      return true
      

      end
      def stop
      UI.messagebox "fin"
      end
      end #class

      posted in Plugins
      inteloideI
      inteloide
    • Launch animation

      Hello

      Can anyone tell me, in ruby, how to launch animation (like using sketchup standard function) to show each pages of the model ?

      The idea is to make a toolbar that allow you to play, pause and stop the animation.

      Thanks for your help.

      posted in Plugins
      inteloideI
      inteloide
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 8 / 8