🏢 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • "something minor is messed up in your model"

    7
    0 Votes
    7 Posts
    2k Views
    TIGT
    I think that the default-layer is now called 'Layer0' in all locales... BUT there was a time that it was named differently for each locale-version. So entity.layer=nil WAS [still is] the safe and correct way to default the object's layer, without recourse to using a 'name' at all... Similarly entity.material=nil and face.back_material=nil will also default those, without recourse to using a 'name' at all...
  • Sketchup Web Exporter

    26
    0 Votes
    26 Posts
    4k Views
    D
    [image: 1pMs_2011-12-3002.08.07am.png][image: Vxb8_2011-12-3002.08.28am.png][image: UIBX_2011-12-3002.08.41am.png] This is my actual selection and the resultant output file ready for playback in SU.
  • Level of a component

    3
    0 Votes
    3 Posts
    241 Views
    S
    @boris vaisman said: Hi everybody, I'm working on a plugin which exports all the components in a csv file and i need the property that gives the level of the component. Hi Boris Your English is great however I can think of at least four meanings for the english word "level" that you might mean. If Davids answer doesnt help perhaps you could indicate which(if any) of these you mean? In a building : "level" can refer to the floor or story of a multistory building. Example "The entrance is on level one, the kitchen is on level two." means the entrance is on the bottom story and the kitchen on the second story/floor. In a hierarchy : "level" can be used like David has to refer to the how far "up" the hierarchy / tree your object is. In ?physics/geometry/building : "level" can mean "flat" or perfectly horizontal/vertical. Example "That window ledge is not level" means the window ledge is not perfectly horizontal. 4 In CAD programs : "level" might refer to a "layer" . Example "Draw your house floorplan on level 0 and then draw 3D elements on other unique layers eg level 1 - 20". cheers Paul
  • [Code] Selection dependant menu item macros

    3
    0 Votes
    3 Posts
    962 Views
    Dan RathbunD
    Your welcome. The example is very basic.. and only adds one item to the menus. The user can expand it to add more than one item to the menus within the same file. You need not have a separate file for each menu item. Just add additional methods into the Proxy class section, and additional context_menu.add_item calls into the context menu handler section.
  • Draw lines using screen coordinates (help)

    6
    0 Votes
    6 Posts
    851 Views
    Dan RathbunD
    @unknownuser said: i don't learn that way.. i wish all those api things had some examples in there (i.e.- type this and watch what happens The API entry for Entities#add_edges() has a straightforward and simple example to add edges to a Sketchup::Model object. (My point of number 1, in the previous post, is that only Sketchup::Entity subclass objects, can be added into the model's DOM (Documnet Object Model heirarchy.) Sketchup::Drawingelement is a subclass of Sketchup::Entity, and the Sketchup::Drawingelement subclass objects are what you "see" in a model, such as Edges, Faces, etc. @unknownuser said: the api documentation probably makes a great reference for someone that already understands the basics (which i don't) see and follow: Ruby Newbie's Guide to Getting Started
  • Toolbar Icon checked_unchecked

    8
    0 Votes
    8 Posts
    272 Views
    G
    @jim said: I do not think there is an infinite loop - the repeating output is because the validation proc is being called by SketchUp very frequently. frequently as much they MF_check, MF_unchek toolbar items. As long as CustomToolbars are open i guess they are repeading output. @jim said: Sure. I like the idea of disappearing toolbars. Mercy, Jim. I'll post free for noel. I hope you customize it as you like it. All yours. I'll drop item.cmd validation from code. sry that.
  • [Question] Icon pressed

    15
    0 Votes
    15 Posts
    966 Views
    Dan RathbunD
    @gultekinmg said: inject that into your code..at "icon_observer.rb" Code for the validation of the icon. def self.obs(id) # ID = Id of your Icon action >> p "This is SU Bug.." and watch them scroll all the way eternity.... NO do NOT do this ! ONLY determine if the return value of the validation proc is MF_CHECKED, MF_GRAYED or MF_ENABLED. Keep conditional evaluations (and any other,) at the bare minimum. ALL visible toolbar validation procs are called by the Sketchup application's main loop, each time the user interface needs to be redrawn (including each time the mouse is moved !!) Menu validation procs are called when a specific menu needs to be displayed.
  • PolygonMesh#normal_at == [0, 0, 0]?

    10
    0 Votes
    10 Posts
    334 Views
    J
    Just looking for a shortcut way to get vertex normals. I know it can be done in Ruby, but was hoping SketchUp did it faster when using a PolygonMesh.
  • [Question] multi document interface and Tools

    7
    0 Votes
    7 Posts
    613 Views
    A
    Thanks, that's very helpful (and I was also wondering why such observers don't exist, good feature request). I'll have to consider this for my webdialog callbacks.
  • Changing units format via ruby

    5
    0 Votes
    5 Posts
    2k Views
    jeff hammondJ
    sweet! exactly what i was looking for. thank you sir
  • Mimic 'select' in custom tool

    3
    0 Votes
    3 Posts
    129 Views
    Dan RathbunD
    An easier way is to make menu macros for the context menus (the right-click popup and the Edit menu's selection submenu.) FYI: I posted a boilerplate sample
  • [Question] how to add entities to componentdefinitions

    7
    0 Votes
    7 Posts
    492 Views
    TIGT
    You already know how to add objects to an '.entities' collection [i.e. for model/active_/definition/group]. Make a new definition, then use defn.entities.add_instances of the other three [already made] components as you wish... OR make the containing definition, then make gp=defn.entities.add_group() and add geometry etc to gp.entities, make the group into a component and then adjust its definition name etc as needed - repeat three times for the contained instances...
  • How to compute dimensions of solar masks

    3
    0 Votes
    3 Posts
    288 Views
    I
    Thank you very much TIG for your work. Your ShadowProjector is great and I'll try to do some reverse engineering on it
  • User Debug Aid Plugin

    6
    0 Votes
    6 Posts
    967 Views
    jeff hammondJ
    ah.. ok.. i see @driven said: the easiest way to load individual plugins is to click add, and under a new Plugins menu there's only Plugin Loader, submenu load single plugin. as you add them your menus grow and the work as normal. yeah, i want to set skindigo up to do this (it messes with the new windows so i can't close them super easily).. can you also turn an individual plugin OFF with this? [ie- load skindigo when i want but easily prevent it from loading on my next launch?] that said, i do have a request in to whaat to make skindigo an extension or try to fix the mac error.. this would work well until that time.. i'm currently renaming skindigo in the plugins folder to keep it from loading when i don't want it.. kind of a hassle..
  • Model refresh issues on Windows

    3
    0 Votes
    3 Posts
    207 Views
    Dan RathbunD
    Did you read ThomThom's: WebDialogs - The Lost Manual — R1 2009NOV09 specifically the section on "Async vs sync Communication"
  • Tool Bar Question

    3
    0 Votes
    3 Posts
    202 Views
    D
    do you read your PM's or check for answers? john
  • Breaking out of a loop

    10
    0 Votes
    10 Posts
    477 Views
    TIGT
    Shouldn't you swap the results of the key-up and key-down events ? You hold the key down it spins, release it and it stops ? Take the self.spin_it out of the activate method, it's run when there's a key-DOWN event anyway. When there's a key-UP event it sets @stop_spin=true, so the 'until test' should expand to be until Time.now - @start_time > 10 **or** @stop_spin and you should remove the matching break from inside the loop too as the until breaks it anyway...
  • Prevent deleting "marked" cpoints/guides ? How?

    2
    0 Votes
    2 Posts
    147 Views
    thomthomT
    You can't prevent an object from being erased. You might be able to recreate it, if you manage to get any info on the erased entity (which is usually garbage by the time the oberser reports it), but you will very likely end up interfering with some other operation. Safer and easier might be to create a custom Erase Guides function that will omit your protected guides. It would be a useful tool, as I've also experience your frustration many time myself. You could use attributes on each entity, or you can use attributes on a layer. Both options would be useful.
  • SketchUp 8 M2 API Docs (Short List)

    3
    0 Votes
    3 Posts
    187 Views
    J
    No reason, but I went ahead and changed the posts to this account to avoid further confusion.
  • Full Screen Sketchup

    8
    0 Votes
    8 Posts
    13k Views
    daikuD
    Two Monitors. One has the drawing window, the other has all the toolbars and windows.

Advertisement