πŸ”Œ Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download
  • Plugin select only one instance + count instances

    5
    0 Votes
    5 Posts
    536 Views
    TIGT
    @sb1305 said: Hi TIG, so I have some more questions about the code. "select only one instance of the components in selection" The code runs for all the components in the model, right? How can I run it for only the ones I select? it would be good to have a code that only selects one instance of each component of my selection. "text-tag: number of instances" And the text tag which says how many instances there are, can I also use that separated from the copying, so that I can put a text-tag only on components that I select somewhere in my library or in the model? "order of components" And another thing, what is the order the components come in? I don't find that in the code, do I? Sorry for all the questions, I would really like to understand the code and work on it, but I have just started doing this. Thank you so much, Simon Replace: ds=[] # component definitions model.definitions.each{|d| next if d.image? || d.group? next unless d.instances[0] ds << d } with something to process the selection instead - a bit more convoluted! ss=model.selection.grep(Sketchup;;ComponentInstance) ds=[] ss.each{|e| ds << e.definition } ds.uniq! Now you have a 'list' of just the definitions relating to selected component-instances [.uniq! ensures there are no repeats]... Process that 'ds' 'array' as before... To make a text_adder() create another method [def]... In it do something like pt=model.bounds.max pt.z=0 pt.offset!([120,0,0]) (model.selection.grep(Sketchup;;ComponentInstance).uniq).each{|e| d=e.definition n=d.name c=d.instances.length t=Geom;;Transformation.new(pt) i=ents.add_instance(d, t) pt.x=i.bounds.max.x+120 # point for next instance ents.add_text("#{n}\nInstances=#{c}", i.bounds.max, [6,6,12]) } If you want to not count the one you have in your 'Library' then change c=d.instances.length to c=d.instances.length-1 etc... remember to wrap it in a namespace/module as the ' composer' example, and use model_start_op...commit so it's one-step undo-able... The order of the components in the earlier post comes from the order in the definitions list, which is 'chronological', so if you made 'zebra' before 'aardvark' that's the order in which they are found. The order in a selection is not easily possible to determine, you can try picking in the desired order [holding Ctrl to add to the selection...]... If you want to get the results in sorted 'name' order, then you need to add in an extra step or two...The code outlined earlier... ss=model.selection.grep(Sketchup;;ComponentInstance) ds=[] ss.each{|e| ds << e.definition } ds.uniq! needs to become something like ... ss=model.selection.grep(Sketchup;;ComponentInstance) ns=[] ss.each{|e| ns << e.definition.name } ns.uniq.sort! ### sorted names... ds=[] ns.each{|n| ds << model.definitions[n] } ### NOW process 'ds' which is a list of definitions sorted by name... You can make a similar change to the 'whole of the definitions' version too. Ruby's 'sort' is 'case sensitive' - you can make it case 'insensitive' using a method [wrapped] like this def self.sort_by(a) return unless a.is_a?(Array) return a.sort_by{|w|[w.downcase, w]} end You then replace the line ns.uniq.sort! with this: ns.uniq! ns=self.sort_by(ns)
  • [Plugin] Key Scene v1.0.3

    22
    0 Votes
    22 Posts
    17k Views
    renderizaR
    [pre:2y7rh979]Author:: Renderiza Plugin Name:: Key Scene Version:: 1.0.3 Date:: 8/29/2013 Cost:: Free[/pre:2y7rh979] New KeyScene v1.0.3 is released! [image: key_dialog.jpg] %(#909090)[Changes: Added a field at the top that says "Editing configuration for scene <scene name>" so that it was more clear which scene was being modified. Fixed bug that will appear If you launch without any scenes in the model, that would get this error in the console: Error: #<NoMethodError: undefined method description' for nil:NilClass> C:/Program Files (x86)/SketchUp/SketchUp 2013/Plugins/RND_KeyScene/RND_KeyScene_loader.rb:103:in push_frame' C:/Program Files (x86)/SketchUp/SketchUp 2013/Plugins/RND_KeyScene/RND_KeyScene_loader.rb:51:in `initialize']
  • A plugin to move the sun in a more practical way?

    3
    0 Votes
    3 Posts
    359 Views
    pietervP
    Thanks Rv1974! I didn't think of the toggle north tool. How would you use TIG's 45 degree shadow plugin for this purpose?
  • Anyone familiar with Rescape?

    3
    0 Votes
    3 Posts
    244 Views
    takesh hT
    @glro said: i don't see any download link on the web page this seems to me more a PROJECT of plugin, than a real one Here you go; http://code.google.com/p/rescape/downloads/list That's a lot of coding...
  • [Plugin] ImageAnimator 20130827

    18
    0 Votes
    18 Posts
    14k Views
    TIGT
    Here's an update: http://sketchucation.com/forums/viewtopic.php?p=293677#p293677 The SKMtools Temp folder that is needed to process Image files etc, is now made in the User's Temp folder [OS specific] rather that the ../Plugins/SKMtools folder, avoiding potential permission issues...
  • Anyone know of a Plugin: open/ close a skp file and save jpg

    7
    0 Votes
    7 Posts
    352 Views
    Rich O BrienR
    Wouldn't Mystic Thumbs or MooTools 3D Browser do this easier?
  • [Plugin] Land F/X

    2
    0 Votes
    2 Posts
    2k Views
    guanjinG
    Thanks for the great tool, showing how it is not complete?
  • BOOM! PluginStore now lists YOUR updates!!!

    18
    0 Votes
    18 Posts
    768 Views
    KrisidiousK
    http://www.youtube.com/watch?v=4qDdLYkyEi4
  • SketchStruct is a free structural analysis plugin

    2
    0 Votes
    2 Posts
    895 Views
    majidM
    Thank you dear friend for this great news
  • Plugins held outside of SCF and their reliability/safety

    4
    0 Votes
    4 Posts
    381 Views
    tt_suT
    Eneroth's plugins are great.
  • [Plugin] Sunflow exporter update

    4
    0 Votes
    4 Posts
    8k Views
    massimoM
    @pieterv said: What does this plugin do please? [image: gm9E_Cattura.JPG]
  • Plugin to connect edges or close a contour?

    5
    0 Votes
    5 Posts
    873 Views
    ken28875K
    @cotty said: maybe Thomthoms -Edge tools: close gaps tool -Architect tools: Contour tool ? Thanks, Carsten. I will check them out.
  • [REQ] continue existing arc plugin

    12
    0 Votes
    12 Posts
    714 Views
    R
    @halroach said: @rv1974 said: Wish it was an universal Extend tool that would respect all variety of 2d: lines, splines, arcs etc. Or even for 3D like with Smart Push Pull... ..with trimming on Alt key. Dream on
  • [Plugin] Divide Angle v1.0.1 20130621

    22
    0 Votes
    22 Posts
    18k Views
    TIGT
    Assuming you have installed the .rb into your Plugins folder [somehow] and restarted SketchUp... Then please reread the tools instruction son the first post in this thread... It is NOT an Extension, just a simple tool. IT only works from the context-menu, and only appears if you have selected two lines that are suitable... I have reprinted the key paragraph below: @unknownuser said: Usage: Select two edges that are not parallel and that could intersect if they don't already share a vertex. Right-click to get the context-menu 'Divide Angle...' Note how this context-menu item is only available if the selection is appropriate. In the dialog enter the number of divisions + OK [default is '2']. It must be a positive integer [2 NOT 2.0]; otherwise you are prompted to retry. Also it must be 2 or more; otherwise there's an error message and it exits. Guide-lines are now drawn through the two selected edges and the division[s] as you have specified. The angle between the edges that is less than 180 degrees is always divided.
  • Plugin request &quot;Section cut&quot;

    12
    0 Votes
    12 Posts
    643 Views
    kenK
    I am surprised no one has mentioned this plugin. I use it all the time to trim steel and piping members. Just draw a face of what you wish to trim away, make your selection and select the face and presto you have trimmed the selection. I use it from drilling holes and trimming ends. http://sketchucation.com/forums/viewtopic.php?t=41582#p368373 Ken
  • Is there such plugin?

    6
    0 Votes
    6 Posts
    391 Views
    jolranJ
  • Plugin to create a progress bar

    23
    0 Votes
    23 Posts
    5k Views
    tt_suT
    Are you using Ruby threads? Threads in Ruby 1.8 are green threads, meaning not native threads. Can you elaborate on how you implemented a progressbar?
  • [Talk] Plugins Index

    179
    0 Votes
    179 Posts
    72k Views
    V
    Muchas Gracias TIG I'll try that.
  • Coordinates XYZ of camera and target

    4
    0 Votes
    4 Posts
    759 Views
    dukejazzD
    Would this help mouse control class DrawBoxPointDJ def onLButtonDown( flag,x, y,dj_view ) Sketchup.active_model.start_operation "onLButtonDown",true,true,true dj_xdown = x;dj_ydown = y;dj_view="drawBoxPoint_dj";dj_point=(Sketchup.active_model.active_view.inputpoint x,y).position puts dj_point . . . . end end Also BMVBv1-Script by T. Marek Sections: Animation - Camera ; Materials - Rendering Draws a face that covers precisely current view. Created face can be used for B&W image with alpha transparency taken from the same camera possition. Face can be semitransparent and have some openings.
  • [Plugin][$] Bifold Door Tools

    17
    0 Votes
    17 Posts
    11k Views
    G
    I have just made payment on PAYPAL & need password to open the zip/rar file. Please sens ASAP. Thank You George gap@gapdesigners.com.au gapdesigners@gmail.com

Advertisement