.NET

Reply
Valued Contributor
HEnnulat
Posts: 51
Registered: ‎10-05-2009
Message 1 of 10 (735 Views)

Exploding a nested block and keeping the exploded parts selected

735 Views, 9 Replies
11-10-2009 01:45 PM
When exploding a nested block that was just inserted into the drawing. Is there a way to programmatically select all the exploded components? The purpose in my case is to locate a nested block and to modify the associateed attribute references.
*Tony Tanzillo
Message 2 of 10 (735 Views)

Re: Exploding a nested block and keeping the exploded parts selected

11-11-2009 12:42 PM in reply to: HEnnulat
I don't see what point there is to exploding a block to change the
attributes of a nested block insertion.

The purpose of putting one block insertion inside the definition of another
'parent' block is to have all insertions of the parent block show the same
data (including values of attributes of nested blocks).

You can't have different values for attributes of a nested block, in each
insertion of the parent block, and this seems to be the source of your
confusion.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6286671@discussion.autodesk.com...
When exploding a nested block that was just inserted into the drawing. Is
there a way to programmatically select all the exploded components? The
purpose in my case is to locate a nested block and to modify the associateed
attribute references.
Valued Contributor
HEnnulat
Posts: 51
Registered: ‎10-05-2009
Message 3 of 10 (735 Views)

Re: Exploding a nested block and keeping the exploded parts selected

11-12-2009 01:49 PM in reply to: HEnnulat
Tony,

It is confusing. However I had a nice long conversation with Jerry Winters who basically wrote the code I was looking for. I will be posting this code shortly as a reply to my original post in the "Working With Nested Blocks" discussion.

My purpose of putting block insertions inside of a parent block is to make it easier to insert the parent block with all the inserted blocks positioned correctly in the parent block (relative to the parent) with one insertion command. Also the parent block is one that is being created according to my specifications whereas the nested blocks are client blocks that I'm not sure will always have the same insertion points.

Ultimately I need to explode the parent block anyway, as it wouldn't meet the client format. The solution that Jerry came up with was to locate the nested blocks prior to exploding the parent (using the insertion points of both the nested and parent blocks and summing these together using a Transform method), exploding the parent, and then locating the formerly nested block just based on their location (insertion point), and changing the attributes. In this way the attributes for each instance (or reference) of the remaining block (or blocks) can all be unique.

It was all clear to me at the time, but based on your comments here I see I wasn't clear enough.
*Tony Tanzillo
Message 4 of 10 (734 Views)

Re: Exploding a nested block and keeping the exploded parts selected

11-12-2009 01:59 PM in reply to: HEnnulat
If the parent block is just a container for inserting multiple objects and
is going to be exploded anyway, that's another matter and no, you didn't
make that clear earlier.

What puzzles me is the approach you cite to do it, because it makes no
sense. When you explode something, you can get the resulting objects very
easily, but perhaps Jerrry doesn't know how to do that.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6288237@discussion.autodesk.com...
Tony,

It is confusing. However I had a nice long conversation with Jerry Winters
who basically wrote the code I was looking for. I will be posting this code
shortly as a reply to my original post in the Nested Blocks discussion.

The purpose of putting block insertions inside of a parent block is to make
it easier to insert the parent block with all the inserted blocks positioned
correctly in the parent block (relative to the parent) with one insertion
command. Also the parent block is one that is being created according to my
specifications whereas the nested blocks are client blocks that I'm not sure
will always have the same insertion points.

Ultimately I need to explode the parent block anyway, as it wouldn't meet
the client format. The solution that Jerry came up with was to locate the
nested blocks prior to exploding the parent (using the insertion points of
both the nested and parent blocks and summing these together using a
Transform method), exploding the parent, and then locating the formerly
nested block, and changing the attributes. In this way the attributes for
each instance (or reference) of the remaining block (or blocks) can all be
unique.

It was all clear to me at the time, but based on your comments here I see I
wasn't clear enough.

Edited by: HEnnulat on Nov 12, 2009 3:52 PM
Valued Contributor
HEnnulat
Posts: 51
Registered: ‎10-05-2009
Message 5 of 10 (734 Views)

Re: Exploding a nested block and keeping the exploded parts selected

11-12-2009 02:14 PM in reply to: HEnnulat
From your post: "When you explode something, you can get the resulting objects very easily"

How? What is the concept and methods employed to do this?

I found that nothing is selected after exploding so there is not way to include what was just exploded in some kind of selection set.

I thought Jerry's code was Genius actually. It didn't take very many lines to figure out the locations of the nested blocks and then find them.

Edited by: HEnnulat on Nov 12, 2009 4:16 PM Edited by: HEnnulat on Nov 12, 2009 4:18 PM
*Tony Tanzillo
Message 6 of 10 (734 Views)

Re: Exploding a nested block and keeping the exploded parts selected

11-12-2009 03:33 PM in reply to: HEnnulat
It depends on how you are exploding the block.

Via the API, or via the command line?

If you are exploding it via the API as you should be, the resulting
objects are added to a DBObjectCollection that you pass in to the
Explode() method, and you must append them to the owner space
yourself (which is trivial).

If you are exploding the objects via the EXPLODE command,
the resulting objects become the "Previous" selection set which
can be gotten via the Editor's SelectPrevious() method.

Considering those things, the approach you describe to find
the exploded objects is what we might call ''the scenic route".

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6288249@discussion.autodesk.com...
From your post: "When you explode something, you can get the resulting
objects very easily"

How? What is the concept and methods employed to do this?

I found that nothing is selected after exploding so there is not way to
include what was just exploded in some kind of selection set.

I thought Jerry's code was Genius actually. It didn't take very many lines
to figure out the locations of the nested blocks and then find them.

Edited by: HEnnulat on Nov 12, 2009 4:16 PM

Edited by: HEnnulat on Nov 12, 2009 4:18 PM
Valued Contributor
HEnnulat
Posts: 51
Registered: ‎10-05-2009
Message 7 of 10 (734 Views)

Re: Exploding a nested block and keeping the exploded parts selected

11-12-2009 04:01 PM in reply to: HEnnulat
That sounds good. Thanks.

And yes, it is programmatically inserted and exploded.
New Member
saeed2006
Posts: 2
Registered: ‎01-26-2010
Message 8 of 10 (734 Views)

Re: Exploding a nested block and keeping the exploded parts selected

01-26-2010 01:33 AM in reply to: HEnnulat
do know how explode a text to line and arcs?
Valued Contributor
HEnnulat
Posts: 51
Registered: ‎10-05-2009
Message 9 of 10 (734 Views)

Re: Exploding a nested block and keeping the exploded parts selected

01-26-2010 09:22 AM in reply to: HEnnulat
I am not aware that text can be exploded into lines and arcs. I do not believe this can be done. I only know that "blocks" can be exploded.
New Member
travis
Posts: 2
Registered: ‎10-26-2009
Message 10 of 10 (553 Views)

Re: Exploding a nested block and keeping the exploded parts selected

03-30-2011 07:37 AM in reply to: HEnnulat

You can explode text to line entities using the Express Tools.

 

To find out if your release has them, type "expresstools" at the command prompt and it will autoload.  If it loads, there is an option under Express -> Text -> Explode Text.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community