sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Observer and new components

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 1 Posters 192 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      larrywayn
      last edited by

      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 πŸ˜„

      1 Reply Last reply Reply Quote 0
      • L Offline
        larrywayn
        last edited by

        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^^

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement