Mac User? | Join the Rayscaper Beta for Mac Learn More

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Hierarchy question

    3
    0 Szavazatok
    3 Hozzászólások
    272 Megtekintések
    Dan RathbunD
    Edited the first paragraph of my reply (above,) to make it more clear that the entities collection, belongs to the ComponentDefinition, and not the instance (be they groups or components.)
  • Sketchup and ruby

    5
    0 Szavazatok
    5 Hozzászólások
    637 Megtekintések
    S
    Thank you very much TIG and kwalkerman. I have tried some simple codes.And the tool interface and pickhelper will be just fine for the task. But now it raised a problem. I want to select a whole sketchup entities object, as one object. So that when I click anywhere on that object (like a house or a building), the same data record will be retrieved from the database. The database contains a record for each house. Do you have any idea about this? Thank you
  • Meshing question

    10
    0 Szavazatok
    10 Hozzászólások
    599 Megtekintések
    M
    Merci quand meme! Ca fait plaisir de discuter de toutes facons. OK, It's still on! Pilou thought I was looking for plugins, not for coding methods.
  • 3D view inside my website

    12
    0 Szavazatok
    12 Hozzászólások
    1k Megtekintések
    T
    A friend of mine sent me the following link, looks like another reason to buy an iPad soon. http://itunes.apple.com/ca/app/magicplan/id427424432?mt=8&ls=1 I'm curious for feedback, .... any ipadies out there willing to testdrive this app?
  • HELP setting up a SU code editor

    97
    0 Szavazatok
    97 Hozzászólások
    16k Megtekintések
    C
    I did a search on the aptana site for "sketchup" and didn't find anything. Are there any installation instructions on how to pair up aptana and sketchup? @thomthom said: That's an interesting article. @unknownuser said: You can download Aptana Studio and RadRails, but the installation process is long and complicated. Besides, if you just want a Ruby editor, downloading a 30-day evaluation version of the gigantic Aptana Studio isn't worth it. Complicated installation process? And the thing is free. http://www.aptana.org/ Anyway - are you able to set breakpoints etc in SU plugin scripts and run them from Eclipse?
  • One-liners

    22
    0 Szavazatok
    22 Hozzászólások
    3k Megtekintések
    N
    I've actually gone and changed my first post so that semi colons are allowed, and have modified your magic formula so the 3 steps are all in one line. I wanted no semicolons to avoid people going crazy with them (you could essentially write a whole program with them in one line of text). How about 3 semi colons maximum?
  • Copy tool --> no preview

    14
    0 Szavazatok
    14 Hozzászólások
    931 Megtekintések
    N
    @dan rathbun said: @thomthom said: Instead of a timer, wouldn't DefinitionObserver.onComponentInstanceAdded be better..? https://developers.google.com/sketchup/docs/ourdoc/definitionobserver#onComponentInstanceAdded He is a month-old newbie.. I didn't want to go into observers with him yet. right ! thanks not "month-old", I'm "week-old" newbie !
  • Stumped

    2
    0 Szavazatok
    2 Hozzászólások
    280 Megtekintések
    TIGT
    I moved your post to a more appropriate place. There are several good threads here - e.g. http://forums.sketchucation.com/viewtopic.php?f=180&t=10142 Also 'Automatic Sketchup' is a good general primer. http://www.autosketchup.com/ On your particular subject... You have already go something like mytext=Sketchup.active_model.active_entities.add_3d_text(xxxxxxxxxxxxxx) where ' xxxxxxxxxxxxxx' represents the various arguments that you need to pass to the method... This then adds the 3d-text as 'raw geometry' into the current context [usually the model's entities]. If you look at the API section on 'entities' https://developers.google.com/sketchup/docs/ourdoc/entities there are lots of ways to add things to ANY 'entities' collection... So to add a group to the model.entities use group=Sketchup.active_model.entities.add_group() Now you have a group in the model and can add things to that group's entities, instead of the model, thus... group.entities.add_3d_text(xxxxxxxxxxxxxx) Now the 3d-text's geometry is inside 'group'... You can add more things into it, or change its name, material, layer etc as you now have a reference to it ' group'... You can even add groups inside such new groups etc, as you desire...
  • Mystery

    4
    0 Szavazatok
    4 Hozzászólások
    367 Megtekintések
    M
    @tig said: Are all of your methods wrapped inside a module and/or class ? I'd be surprised that Fredo has a raw 'deactivate' method I suspect you do ! It might be an observer trapping your error into his own error reporting, assuming it's his tool's error... The standard Tool deactivate method is def deactivate(**view**) ...Try adding that inside a Tool class... ??? https://developers.google.com/sketchup/docs/ourdoc/tool#deactivate YES! That did it! Yes it was all within a class. Just adding "(view)" solved the problem. I didn't change anything else. The deactivate method was within the class and still is. Yes indeed I strongly suspected that Fredo had nothing to do with this. Thanks TIG and Dan.
  • Looking for a Developer

    4
    0 Szavazatok
    4 Hozzászólások
    307 Megtekintések
    J
    @dan rathbun said: Are you the JL2004 who posted this ?? https://groups.google.com/forum/?fromgroups#!topic/sketchupruby/2Tdb5bYyyd8 No that is not me. I am looking through the Ruby Guide as well as teaching myself Ruby. Just feel its taking a long time and its something I would like to get out sooner than later.
  • Define possible (manifold) groups in a model

    2
    0 Szavazatok
    2 Hozzászólások
    257 Megtekintések
    TIGT
    Perhaps start from a different angle... A manifold solid group has the following properties... It contains only faces and their edges. AND these edges can only have two faces - no fewer, no more. So this is start - you can eliminate all other faces/edges ? The number of permutations will always expand exponentially... What is it you are trying to do, exactly ?
  • Menus & Tools

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    N
    @dan rathbun said: @niccah said: Just a small question: Why you are writing " Sketchup.require"? Are there any differences to the "normal" require? FYI: The "normal" require (and load,) comes from module Kernel. Sketchup.require and Sketchup.load can call the internal decryption for rbs files, but the Kernel ones cannot. Okay, this sounds logic! Thanks for the information!
  • Plugin for Gaussian bells

    5
    0 Szavazatok
    5 Hozzászólások
    407 Megtekintések
    D
    thank you very much for the help, great links
  • Explode group, retrive all entities and recreate group

    14
    0 Szavazatok
    14 Hozzászólások
    2k Megtekintések
    N
    @dan rathbun said: Does your boss ever use the [image: http://forums.sketchucation.com/download/file.php?id=87554] Model Info > Statistics panel ?? [attachment=1:1ebrpxvl]<!-- ia1 -->ModelInfo_Statistics.png<!-- ia1 -->[/attachment:1ebrpxvl] Yes he knows this tool, but it don't give you the texture (in m²) and of the components neither groups thanks to all everybody !!! I think I found the solution. When I need to found each entities in a group I use that : if g.is_a?(Sketchup;;Group) g.entities.each do |element| if element.definition.name[0] != 0 && element.name == "" element.name = "#{element.definition.name}" end # end if end #|element| With that, I can change the name of component inside a group The first code of TIG gave me an idea, I combine my code with a piece of code from him and it worked ! (it was only a sample of code used to test for me) Now I have to copy that piece of code in the big one ! Before : [image: http://img205.imageshack.us/img205/1108/33890297.png] After launching the plugin : [image: http://img585.imageshack.us/img585/7154/18942418.png]
  • Capturing $sterr output

    10
    0 Szavazatok
    10 Hozzászólások
    895 Megtekintések
    danielbowringD
    @unknownuser said: In pas trials, I noticed that the SU error message (whether for syntax at load time or at run-time) are not handled by the console Ruby object, but send directly to the console at C level. @jim said: I can't get this to work now. I know it used to work, and had used it daily. Maybe the latest version of SketchUp changed somehow? @unknownuser said: It would nice if we could redirect all messages toward a known output stream. ... Maybe we should ask the SU team I'd assume then that we are unable to capture it, as irritating as that is. Thanks all
  • ComponentInstance name and Group name

    21
    0 Szavazatok
    21 Hozzászólások
    2k Megtekintések
    N
    Hi everyone ! I have found how to correct my code !! It's was just an error of algorithm. At first time I had this condition : chose.name[0] != 95 And I would like to have this : chose.name[0] != 95 || chose.definition.name[0] != 95 but it doesn't work ... The solution is : chose.name[0] != 95 && chose.definition.name[0] != 95 As I said, I'm beginning ! Thanks to all! especially TIG
  • Update a WebDialog

    8
    0 Szavazatok
    8 Hozzászólások
    988 Megtekintések
    D
    Your first problem is very easy to solve, just make sure that your ruby script executes asynchronously. I use this function in a couple of my scripts instead of the outer-most loop: def asyncLoop(range, &proc) from = range.min to = range.max iteration = lambda do |index| last = (index > to) proc.call(index, last) if !last then UI.start_timer(0.02, false) { iteration.call(index.succ) } end end iteration.call(from) return nil end You can use it like this: asyncLoop(0...16) do |i, last| if (!last) then # Perform ith iteration else # Put code to be run after this operation here instead of outside the loop end # Code here will run immediately, so leave it empty
  • [QUESTION] Reading Text From TXT

    4
    0 Szavazatok
    4 Hozzászólások
    312 Megtekintések
    J
    I'd just write: text = IO.read("path/to/file.txt")
  • UI.savepanel question

    9
    0 Szavazatok
    9 Hozzászólások
    749 Megtekintések
    Dan RathbunD
    FYI .. file_new() will close the active model only on Windows (because it's not an MDI interface.) On Mac.. another document window is opened, and becomes active, but the old one with the old model is still open. This post belongs in the Ruby forum.
  • Absurd camera behaviour

    9
    0 Szavazatok
    9 Hozzászólások
    633 Megtekintések
    Dan RathbunD
    Ok I played around a bit in the console.. and I agree with you. This is another example of poorly wrapped C++ objects that can cause Rubyist's nightmare. Each time we call Sketchup.active_model.active_view.camera we get a new Ruby object. Ex: Sketchup.active_model.active_view.camera == Sketchup.active_model.active_view.camera %(#008000)[>> false]

Advertisement