acedCommand _explode explode only one blockref

acedCommand _explode explode only one blockref

Anonymous
Not applicable
813 Views
11 Replies
Message 1 of 12

acedCommand _explode explode only one blockref

Anonymous
Not applicable
Hi,
I try to use the acedcommand with autocad command _explode.

This is my code:

int res = acedCommand(RTSTR,L"_explode", RTPICKS, ssq, RTNONE);

ssq is a a ads_name wich contains 2 block reference.

explode work only for one blockreference, other blockref are still blockreference.

help me, please...
0 Likes
814 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable
> explode work only for one blockreference, other blockref
> are still blockreference.

When _EXPLODE is executed by script, it accepts only a single entity, not
a selection set. To explode a selection set programmatically, select it
first (via acedSSSetFirst), then run the _EXPLODE command. 🙂
--
Owen Wengerd
President, ManuSoft <>
VP Americas, CADLock, Inc. <>
0 Likes
Message 3 of 12

Anonymous
Not applicable
Or... you can write a little more code and use the undocumented system
variable: QAFLAGS [info about this one and more can be found at
http://www.manusoft.com]

Just set QAFLAGS to: 1 and once acedCommand is done return the value to: 0
0 Likes
Message 4 of 12

Anonymous
Not applicable
Hi Owen,
thanks for reply!

I try acedSSSetFirst but the result is the same... this my code:

AcDbObjectIdArray vett;
SelectAll(vett);

ads_name ssq;
ObjectIdArrayToSelectionSet(vett, ssq);

int res = acedSSSetFirst(ssq, NULL);

res = acedCommand(RTSTR,L"_explode", RTPICKS, ssq, RTNONE);

res = acedSSFree(ssq);

Where is the error?

I have also set flags ACRX_CMD_USEPICKSET and ACRX_CMD_REDRAW to my command

thanks for reply!
0 Likes
Message 5 of 12

Anonymous
Not applicable
> I try acedSSSetFirst but the result is the same... this my code:

Try this instead:
res = acedCommand(RTSTR,L"_explode", RTNONE);
--
Owen Wengerd
President, ManuSoft <>
VP Americas, CADLock, Inc. <>
0 Likes
Message 6 of 12

Anonymous
Not applicable
thanks a lot,
it woks fine!

Andrea
0 Likes
Message 7 of 12

Anonymous
Not applicable
Hi,
I need to get the new entities generated from the _explode command.
I try tu use an acdbdatabsereactor. I had already code to do this. My derived class to get the object that are appended at runtime.

But I see a strange behavior, seems that reactor is asynchronous, the new entities aren't appended soon after the explode command, but.. after.

is this correct ?
how to force the append of new entities to dwg database during the explode command ?

thanks in advance
andrea
0 Likes
Message 8 of 12

Anonymous
Not applicable
Did you try getting the Previous selection set?

--
http://www.caddzone.com

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

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:[email protected]...
Hi,
I need to get the new entities generated from the _explode command.
I try tu use an acdbdatabsereactor. I had already code to do this. My derived class to get the object that are appended at runtime.

But I see a strange behavior, seems that reactor is asynchronous, the new entities aren't appended soon after the explode command, but.. after.

is this correct ?
how to force the append of new entities to dwg database during the explode command ?

thanks in advance
andrea
0 Likes
Message 9 of 12

Anonymous
Not applicable
Yes, I have the previous selection set... I try also to get the new entities by difference between a total selection set before the explode command and a total selectionset after explode command, but the entities aren't appended.

I return to use acedcommand _explode with the sel. set with the single ename to explode. I work only for one entity...I have do this inside a for. Passing the selection set to the acedcommand the new entities are appended correctly and the acdbdatabase reactor retourn me the new entities.

thanks a lot. Andrea
0 Likes
Message 10 of 12

Anonymous
Not applicable
Andrea,

You have been led up the garden path of the fishermen.

Might I suggest that you take one step back and examine what
you are trying to achieve!

1. Do not use the acedCommand.
2. Walk thru your selections set and explode each item individually
adding the cloned AcDbObjectId to an array. (AcDbObjectIdArray)


This will take some effort but at at least you will not be going
down the wrong path and I will assist you!

Regards Gary
0 Likes
Message 11 of 12

Anonymous
Not applicable
I guess you're just dense to have considered the possibility that the OP may be using the EXPLODE command because it can do things that cannot be done/easily done using the explode() method.

--
http://www.caddzone.com

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

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

"Gary D'Arcy" wrote in message news:[email protected]...
Andrea,

You have been led up the garden path of the fishermen.

Might I suggest that you take one step back and examine what
you are trying to achieve!

1. Do not use the acedCommand.
2. Walk thru your selections set and explode each item individually
adding the cloned AcDbObjectId to an array. (AcDbObjectIdArray)


This will take some effort but at at least you will not be going
down the wrong path and I will assist you!

Regards Gary
0 Likes
Message 12 of 12

Anonymous
Not applicable
Tony,

Well maybe I am. Or maybe what is easy for me is
not so easy for you. I did offer to help the O.P through the barrier.

Help like this is
>>I need to get the new entities generated from the _explode command

Your reply Did you try getting the Previous selection set?
This is not helpful! Why would the previous set be a replacement for the new
entities?

>>QAFLAGS ?? why!

and this!

>>To explode a selection set programmatically, select it
>>first (via acedSSSetFirst), then run the _EXPLODE command. 🙂

Generally the whole thread is a waste of space since one can easily explode
a selection
using the AcedCommand. If you address the original problem.


Take Care Tony

Regards Gary
www.drcauto.com
0 Likes