@dan rathbun said:
Now... model#place_component()
(1) The API dictionary is incorrect, it does NOT return nil, it returns a reference to the active_model which is basically frivolous, but does allow call chaining.
We have logged an API doc typo on this, as well as asking for something more useable to be returned (especially in the case of multiple insertions when the 2nd argument is true.)
(2) When the 2nd argument is false, and only 1 instance is inserted, model#place_component() works the same as the native tool, ie: the selection is cleared, and the newly placed component instance's reference is pushed into the selection (as it's only member.)
So you can get it's insertion point as discussed in the post above.
FYI ... When the 2nd argument to model#place_component() is true, and multiple instances MIGHT HAVE BEEN inserted, the model's selection object IS NOT CHANGED.
If something was previously selected, it still is. If the selection was empty, it will still be empty.
Dan,
thank you for you for your two posts which are very helpful. I would have ticked them both as 'resolve' but I had already done this for a previous post and 'the system' wouldn't allow me to tick more than one post as a 'resolved' post. I will be trying your ideas soon. Thanks again. Francis