.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select Nested

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
883 Views, 5 Replies

Select Nested

Can .Net 1) select multiple nested entities 2) within the same block reference 3) in one crossing window action? If
so would you please give me a nudge in the right direction?

I am totally new to C# and .Net and don't have any prior experience with ObjectArx either. I have gotten as far as
the attached code, but it will only select one nested entity per crossing window per block reference. If with a
single crossing window I cross two or more nested entities in a block/xref I want them all to be selected. For
example, the built in Trim/Extend commands work as I'm trying to get this to.

Thank you,
--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

I found this 3 year old post stating that there is nothing built in for this even in native arx.
http://discussion.autodesk.com/thread.jspa?messageID=3967495
I've been searching high and low and can't find anything for it, managed or otherwise. That's very disappointing.
It seems to me like they would have made this available by now.

I'm considering other alternatives now and will post back if I come up with anything I think is worthwhile.

James


"James Allen" wrote in message news:5691593@discussion.autodesk.com...
Can .Net 1) select multiple nested entities 2) within the same block reference 3) in one crossing window action? If
so would you please give me a nudge in the right direction?

I am totally new to C# and .Net and don't have any prior experience with ObjectArx either. I have gotten as far as
the attached code, but it will only select one nested entity per crossing window per block reference. If with a
single crossing window I cross two or more nested entities in a block/xref I
want them all to be selected. For
example, the built in Trim/Extend commands work as I'm trying to get this to.

Thank you,
--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO
Message 3 of 6
Anonymous
in reply to: Anonymous

James;

I did a quick test in objectarx and it provides the same as in c#... and then did also some code in c# to emulate what the command trim does.

Sorry no code available, but this is what I did and just for blocks no xrefs and as an exercise and appears to work just fine:

1. Select the blocks that are in the screen view and make a deep nest explode of them and save the exploded entities ids inside of an ObjectIdCollection and add the temporary entities to the drawing and the blocks ids in another one - making sure to hide them via: block.Visible = false.

2. Then, in your command just have your nest blocks explode function before making a selection, that will generate the blocks items as normal entities, then make your selection and do your stuff and verify if your ids collections are not empty and erase the temporary entities and turn on the visible mode of the blocks.

HTH.
Message 4 of 6
Anonymous
in reply to: Anonymous

Hi Luis,

Thank you. I'm currently thinking along different lines (though not getting much time to put on it). I would need
this to work with xrefs and am afraid that something involving explode may be too much for xrefs or large selection
areas. I haven't ruled it out but am pursuing other possibilities first.
--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO


wrote in message news:5696545@discussion.autodesk.com...
James;

I did a quick test in objectarx and it provides the same as in c#... and then did also some code in c# to emulate
what the command trim does.

Sorry no code available, but this is what I did and just for blocks no xrefs and as an exercise and appears to work
just fine:

1. Select the blocks that are in the screen view and make a deep nest explode of them and save the exploded entities
ids inside of an ObjectIdCollection and add the temporary entities to the drawing and the blocks ids in another
one - making sure to hide them via: block.Visible = false.

2. Then, in your command just have your nest blocks explode function before making a selection, that will generate
the blocks items as normal entities, then make your selection and do your stuff and verify if your ids collections
are not empty and erase the temporary entities and turn on the visible mode of the blocks.

HTH.
Message 5 of 6
Anonymous
in reply to: Anonymous

/*Thank you. I'm currently thinking along different lines (though not getting much time to put on it). I would need
this to work with xrefs and am afraid that something involving explode may be too much for xrefs or large selection
areas. I haven't ruled it out but am pursuing other possibilities first.*/

James;

If you want to run your own tests with the functions I wrote, I can e-mail them to you.

Running the tests on simple blocks (using a large number on the screen view), it works very fast.

I will try to add the xrefs, and see how that might work - I might need something like this.
Message 6 of 6
Anonymous
in reply to: Anonymous

I would like to test your functions, but not until I have my own working. I've gotten far enough with mine that I
really want to follow through with it to see how it works out, even if it turns out to not be as effective or
efficient as yours. As I mentioned I'm new to .Net, and this is proving to be a very educational exercise.

I look forward to seeing how they compare. My address is in the header; just change the obvious.
--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO


wrote in message news:5697474@discussion.autodesk.com...
/*Thank you. I'm currently thinking along different lines (though not getting much time to put on it). I would need
this to work with xrefs and am afraid that something involving explode may be too much for xrefs or large selection
areas. I haven't ruled it out but am pursuing other possibilities first.*/

James;

If you want to run your own tests with the functions I wrote, I can e-mail them to you.

Running the tests on simple blocks (using a large number on the screen view), it works very fast.

I will try to add the xrefs, and see how that might work - I might need something like this.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost