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