🏒 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Breaking an ArcCurve - how?

    2
    0 Votes
    2 Posts
    124 Views
    thomthomT
    Yes Thomas - you blind pillock - it's under the Edge class. Edge.explode_curve http://code.google.com/apis/sketchup/docs/ourdoc/edge.html#explode_curve
  • [Web dialog] switch snippet for pc / mac

    7
    0 Votes
    7 Posts
    299 Views
    chrisglasierC
    To make or to become weary; A feeling of being mentally fatigued; Expressive of fatigue Wary: marked by keen caution and watchful prudence; Either I think is appropriate. But more important cgScenes might well become compatible - some kind of milestone in PC/Mac WD compatibility perhaps.
  • Any way through ruby to create a component collection

    4
    0 Votes
    4 Posts
    203 Views
    chrisglasierC
    And, John, I think you said you have Macified cgScenes. I wonder if that version also works on PCs. Or do you think it should released as a Mac version? Oh and also you should note that cgScene start button was introduced because Macs run the script before loading the model. However nset doesn't rely on model data at the start but it is something you might like to add to the "no js after window.location" for callbacks I pointed to before.
  • Separating a plugin from others

    22
    0 Votes
    22 Posts
    1k Views
    tbdT
    FILE when ruby is scrambled is useless as it gets evaled, so you cannot use it. had the same problem when developing/using Sketchup Bridge. workaround: add the path to the global search path for loading scripts $:
  • Toogle Dialogs via Ruby?

    5
    0 Votes
    5 Posts
    624 Views
    Dan RathbunD
    @thomthom said: Ok - that's toggle. aka (Menu) Windows > Show / Hide Dialogs @thomthom said: ... And is there any way to know if they are hidden or not? You CAN get whether the USER has each one set to be shown or hidden thru the registry. Ex: Sketchup.read_default('SnappyComponents','show',0)==1 ? true : false and also whether it's RolledUp or not Sketchup.read_default('SnappyComponents','Minimized',0)==1 ? true : false EDIT: Nevermind read_default (doesn't work) use the standard Ruby Registry module. Seems Sketchup.read_default cannot handle (or does not return by design,) DWord values in the Registry. EDIT2: Fixed: the 'show' attributes are all downcase. IF attribute 'Show' is 0, the dialog is hidden no matter what the (global) "Show/Hide Dialogs" toggle setting is. IF the dialog is 'rolled-up', AND shown (on screen) it's 'Minimized' attribute is 1 AND 'show' is 1. When you close the 'Minimized' dialog, it's attributes are 'Minimized'=1 and 'show'=0. When a closed 'Minimized' dialog is re-shown (Same session, or new session,) the 'Minimized' attribute is changed to 0 because Sketchup auto-unrolls it, and the 'show' attribute = 1. But I cannot find a way to know (cross-platform) whether the (Show/Hide Dialogs) Menu item is checked or not. Of course we can do it using Win32API call. When the dialogs are globally Hidden their 'Show' registry attributes remain unchanged, and the Show/Hide toggle is reset (all dialogs are shown per registry settings,) when you reopen Sketchup.
  • Trouble triggering javascript event from sketchup

    14
    0 Votes
    14 Posts
    681 Views
    thomthomT
    @unknownuser said: button.attachEvent. Yes -that jogged my memory - attachEvent was the IE way. (imagined that later IE (IE7 or IE8) used addEventListener as it's part of the DOM standard. But maybe I was wrong. ...or maybe it depends on the doctype....
  • C != C

    18
    0 Votes
    18 Posts
    680 Views
    M
    @agamemnus said: With the recent Google Chrome's and Firefox's very fast Canvas (graphics) rendering, JS has become even more useful. I second that emotion! <canvas> is great. It's just about the most fun you can have in 2D.
  • Pianola demo

    3
    0 Votes
    3 Posts
    329 Views
    chrisglasierC
    And ... it can be quick and easy to edit/customise in an open source environment. ... it could have audio commentary. Wikipedia
  • Help and contribution needed. Thank you.

    3
    0 Votes
    3 Posts
    160 Views
    M
    Do you have the dialog sketched? Is there a fixed dialog or does it vary depending on the model? An HTML form would go a long way here.
  • Cloud_V6 query

    13
    0 Votes
    13 Posts
    1k Views
    TIGT
    Only certain 'raw' file types are allowed to be uploaded here: a .csv file needs re-sufixing or zipping... I tested the file and it worked fine for me - imported cloud and made a surface [v7 + PC] - so... do you have the latest version and its pdf help file ? http://www.crai.archi.fr/RubylibraryDepot/Ruby/em_fil_page.htm get the Cloud_v6,zip file...
  • Re-use progress bar that Dynamic Components use

    5
    0 Votes
    5 Posts
    199 Views
    T
    You can send out progressbar with your code, but tell your clients where you got it and to come to us for support. Todd
  • Is there any vertex editing plugin?

    27
    0 Votes
    27 Posts
    2k Views
    mitcorbM
    ThomThom: As you know, some of the Sketchup tools and plugins will create quads, such as pushpull, follow me, lines to tubes. The results seem more refined, less chaotic to me. Blender has a built in tool to reduce triangles to quads, for instance, because apparently, that program prefers it. But I guess it's all about file size economics.
  • Ruby :symbols

    3
    0 Votes
    3 Posts
    142 Views
    M
    @thomthom said: What is off target and plain wrong? A question I can't answer until I can answer my own question: What's a symbol? The link was a good one but after a too-quick read I was better versed in what you could do with symbols that what a symbol was. In most languages there is a symbol table, under the covers. Ruby symbols seem to be bringing this capability forward, allowing us to add to the table in some way that I'm not sure I understand. Edit: make that "in some way I'm sure I don't understand." end edit Nagging questions: if "foo" is a variable name it will be in the symbol table and :foo will be a symbol. What about "foo.bar"? Is that a :foo plus a :bar, or is it :foo.bar?
  • By value or by reference?

    20
    0 Votes
    20 Posts
    2k Views
    Dan RathbunD
    @thomthom said: @unknownuser said: see also The Ruby programming language By David Flanagan, Yukihiro Matsumoto Interesting link. I think I need to read further into that book. No Kidding! Yukihiro Matsumoto is "Matz" the inventor of Ruby! I didn't know Google Books had this.
  • Sketchup registry key ?

    27
    0 Votes
    27 Posts
    13k Views
    Dan RathbunD
    @jim said: Does there exist some sort of .zip installer? As I recall, WinZip could create self-extracing archives (.exe extension,) with a 'suggested destination folder'. When run, a confirm dialog popus up, allowing the user to override with a browse button, or simply edit the destination path in the edit control box. Still in use today, but I believe is a pay WinZip Pro version that only will do this. Cabinet files (.CAB) are free and native to Windows, I believe at least the extract exe is installed on all Win32 machines; the cab maker (filename slips my mind,) is in the SupportTools package. BTW, MSIs use cab by default I believe.
  • Projections extension - Extrude lines with vector problem

    7
    0 Votes
    7 Posts
    701 Views
    Chris FullmerC
    [Portuguese] Acho que talvez vc esta pensando em meu plugin chamado "Three Line Tools" (tres utilidades de linhas (mais ou menos)). Pode acha-lo aqui: http://forums.sketchucation.com/viewtopic.php?f=323&t=16923 e o plugin esta ao baixo do primeiro "post" meu. E si nao Γ© aquele plugin qeu esta buscando, fica a vontade de explicar em portugese como funciona o plugin que esta procurando E desculpa si meu portuguese esta rui, sou da California e foi dez anos atraz que eu vivi em brasil. Chris [English] I think you are looking for my Three Line Tools plugin. Here is the link: http://forums.sketchucation.com/viewtopic.php?f=323&t=16923 and the plugin is at the bottom of my first post. And if that is not the pluing you are looking for, feel free to explain in portuguese how the plugin you are looking for funtcions. And sorry if my portuguese is horrbile, I'm californian and it was over 10 years ago that I lived in Brazil. Chris
  • Material Window Context Menu

    3
    0 Votes
    3 Posts
    124 Views
    D
    That's too bad. Thanks for the repsonse.
  • Count instances in selection???

    3
    0 Votes
    3 Posts
    178 Views
    TIGT
    You want to count the instances in a selection... counts=[] ss.each{|e|counts<< e.definition if e.class==Sketchup;;ComponentInstance} countsuniq=counts.uniq compocount=[] countsuniq.each{|e| count=0 counts.each{|c|count+=1 if c==e} compocount<< [e.name, count] } ### compocount is an array, with each item as an array of the instance's definition.name [you could change it to just the definition itself 'e' ?] and then its number of instances as counted in the selection (ss)...
  • View.draw2d and AA - precision

    12
    0 Votes
    12 Posts
    489 Views
    thomthomT
    hmm... I can use the SU preferences to detect the AA settings of SU. On Windows it's under GLConfig > Display. Then I need to locate that on OSX. Only thing is that reading registry requires more files and makes for more complicated dependabilities. And I don't get the make of the card from SU's prefs...
  • Selection start/end detection

    4
    0 Votes
    4 Posts
    170 Views
    C
    A "Selection" is a collection of entities (lines, faces, etc.) In order to get the line, you have to get the first object in the Selection, since you only have one thing selected: line = selection[0] Then, once you have the line, you can get the start and end vertices like this: vtxStart = line.start vtxEnd = line.end To get the positions of the vertices, just type either: startPosition = vtxStart.position or endPosition = vtxEnd.position Hopefully this is clear enough to get you started.

Advertisement