sketchucation logo sketchucation
    • Login
    1. Home
    2. larrywayn
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Groups 1

    larrywayn

    @larrywayn

    10
    Reputation
    1
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    larrywayn Unfollow Follow
    registered-users

    Latest posts made by larrywayn

    • RE: Observer and new components

      Sorry for bumping but here some update:
      The ToolsObserver helped me to find out, that the ComponentTool (21013 - Maybe something else on Mac it is called onentToo) is activated if a user click on a component in the library.
      If i would know, which definition or at least definitionname this component has, i could implement an own tool to place the component. Maybe $dc_observers.get_latest_class has a function to retrieve the name, or another variable? πŸ˜•

      Because when i look in the active_model.entities, there are only the existing entities but not the one at the cursor..
      i can't believe, that there is no variable or method to get this information.

      Perhaps i do it totally wrong and there is another simple solution letting the choosen component snaps to specified faces/components (no the snaping in SketchUp is not very useful)
      frustrating^^

      posted in Developers' Forum
      L
      larrywayn
    • Observer and new components

      Hello again^^
      I do not think it exists, but is it possible to get the component, which is snapped at the cursor, if you select a new component out of the library?
      also is there a better trigger then onTransactionCommit, which reacts when this action described before is performed, to start an tool?

      what i want to do:
      when a new component is choosen, then it should snap to a specific point, but only if it is over another component. The only problem is still, getting the component at the cursor. everything else works fine but only when the user release the component.

      perhaps there are some global variables, which could be used, if there is no normal way?

      thanks in advance
      larrywayn πŸ˜„

      posted in Developers' Forum
      L
      larrywayn
    • RE: OnPlaceComponent: place the instance in a group

      Thanks everybody.
      Wasn't the solution i hoped for but instead i wrote a name organized system, which perfectly fits our needs.
      Now there are other problems, hope i can get a solution for them πŸ˜ƒ

      larrywayn

      posted in Developers' Forum
      L
      larrywayn
    • RE: OnPlaceComponent: place the instance in a group

      sigh
      why is something easy, like changing a group reference, hard to change in ruby?
      i think it could be possible deleting and recreating everything, everytime.. but that takes time and performance (and also if it is buggy, its not that good). Thats not acceptable. if there are 100 components that would be no fun.. because the user should be able to move components dynamically from one group to another and without waiting till everything is recreated.

      another solution would be to use the componentnames only without groups. looping over the names and renaming the components. think thats much easier to implement.. but moving a group of elements, which contains together, (without grouping them) would be difficult, too

      Damn Sketchup api ^^

      posted in Developers' Forum
      L
      larrywayn
    • OnPlaceComponent: place the instance in a group

      System: Mac Os X 10.6.2
      Sketchup: Pro 7.1.6859

      Hello everybody

      I have a little Problem.. i hope it is something easy and i was to
      stupid to figure it out of the api and the diagram.
      I know how to create new groups. I know how to create new instances. I
      know how copy instances into groups. I think the api
      needs a clean up and to get more in detail sometimes.. but this is
      another problem.

      If i have an instance like in the onPlaceComponent
      (Sketchup::ModelObserver), is it possible to place this instance into
      an existing group?
      The only way i figured out now is, to place a new instance using the
      definition with add_instance into the group and then delete the other
      one.. but thats dirty
      (group.entities.add_instance(instance.definition, transformation) ...)

      There has to be a way moving instances out of groups into others and
      so on .. some possibility to edit the group-hierarchy
      because when i use the outline window, it is possible. It has to be
      possible with the api as well (i hope) ?

      Thanks in advanced and excuse my bad english
      (i posted the question in the Google SketchUp Developers group as well, but it seems that there is not much going on. Hope thats okay)
      larrywayn

      posted in Developers' Forum
      L
      larrywayn