Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exploding Minsert blocks

36 REPLIES 36
SOLVED
Reply
Message 1 of 37
kylei7449
63626 Views, 36 Replies

Exploding Minsert blocks

kylei7449
Enthusiast
Enthusiast

I've been searching for a routine to explode minserts but haven't found anything yet that works. However, this one did. It's a vlx that I found on another forum (sorry, don't remember which or I'd give the poster/author the credit)

 

Just copy it to your Support folder and load it ("AP"). Type "explodem" at the command line to run it. It first asks you to select the block; it then asks you if you want to explode? [No/Yes]  Enter No. Yep, enter no. (I know; I tried Yes but it wouldn't work...might be just me though cuz I'm a bit dyslexic; either that or the programmer may be?)

 

Worked for my situation. Give it a try.

 

 

Exploding Minsert blocks

I've been searching for a routine to explode minserts but haven't found anything yet that works. However, this one did. It's a vlx that I found on another forum (sorry, don't remember which or I'd give the poster/author the credit)

 

Just copy it to your Support folder and load it ("AP"). Type "explodem" at the command line to run it. It first asks you to select the block; it then asks you if you want to explode? [No/Yes]  Enter No. Yep, enter no. (I know; I tried Yes but it wouldn't work...might be just me though cuz I'm a bit dyslexic; either that or the programmer may be?)

 

Worked for my situation. Give it a try.

 

 

36 REPLIES 36
Message 21 of 37
ed57gmc
in reply to: Anonymous

ed57gmc
Mentor
Mentor

If you would like a single one-click command, I wrote something in C# that will do this.

        //  ExplodeMinsert
        /// <summary>
        /// ExplodeMinsert is a command that explodes a <c>MINSERT</c> entity.
        /// </summary>
        [CommandMethod("TID", "ExplodeMinsert", "ExplodeMinsert", CommandFlags.Modal)]
        public void ExplodeMinsert()
        {
            // Ask user For old block name
            PromptEntityOptions PEO = new PromptEntityOptions("Select a MINSERT entity to explode: ");
            PEO.SetRejectMessage("You need to select a minsert: ");
            PEO.AddAllowedClass(typeof(MInsertBlock), true);
            PEO.AllowNone = false;

            PromptEntityResult PER = Active.Editor.GetEntity(PEO);
            try
            {
                using (Transaction trans = Active.Database.TransactionManager.StartTransaction())
                {
                    MInsertBlock oMins = (MInsertBlock)trans.GetObject(PER.ObjectId, OpenMode.ForWrite);
                    oMins.ExplodeToOwnerSpace();
                    oMins.Erase();
                    trans.Commit();
                };

            }
            catch (Autodesk.AutoCAD.Runtime.Exception ex)
            {
                //Throw Exception or ignore if user cancelled command.
                if (ex.ErrorStatus != ErrorStatus.NullObjectId)
                {
                    MessageBox.Show("Error Occured in ExplodeMinsert command. " + ex.Message + ", " + ex.HelpLink, "ExplodeMinsert Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                };
            }
        }

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes

If you would like a single one-click command, I wrote something in C# that will do this.

        //  ExplodeMinsert
        /// <summary>
        /// ExplodeMinsert is a command that explodes a <c>MINSERT</c> entity.
        /// </summary>
        [CommandMethod("TID", "ExplodeMinsert", "ExplodeMinsert", CommandFlags.Modal)]
        public void ExplodeMinsert()
        {
            // Ask user For old block name
            PromptEntityOptions PEO = new PromptEntityOptions("Select a MINSERT entity to explode: ");
            PEO.SetRejectMessage("You need to select a minsert: ");
            PEO.AddAllowedClass(typeof(MInsertBlock), true);
            PEO.AllowNone = false;

            PromptEntityResult PER = Active.Editor.GetEntity(PEO);
            try
            {
                using (Transaction trans = Active.Database.TransactionManager.StartTransaction())
                {
                    MInsertBlock oMins = (MInsertBlock)trans.GetObject(PER.ObjectId, OpenMode.ForWrite);
                    oMins.ExplodeToOwnerSpace();
                    oMins.Erase();
                    trans.Commit();
                };

            }
            catch (Autodesk.AutoCAD.Runtime.Exception ex)
            {
                //Throw Exception or ignore if user cancelled command.
                if (ex.ErrorStatus != ErrorStatus.NullObjectId)
                {
                    MessageBox.Show("Error Occured in ExplodeMinsert command. " + ex.Message + ", " + ex.HelpLink, "ExplodeMinsert Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                };
            }
        }

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 22 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

its works great .load the file and type explodem then give yes .

0 Likes

its works great .load the file and type explodem then give yes .

Message 23 of 37
ksreekumar
in reply to: kylei7449

ksreekumar
Explorer
Explorer

Greetings,

Thank you for the .vlx file worked perfectly to me.

0 Likes

Greetings,

Thank you for the .vlx file worked perfectly to me.

Message 24 of 37
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

Thanks @Anonymous .

 

Your solution works like a charm. I'd vote this as the best solution if I could.

 

0 Likes

Thanks @Anonymous .

 

Your solution works like a charm. I'd vote this as the best solution if I could.

 

Message 25 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

Bro, it worked for me so i thank you so much. i really appreciate your help.

0 Likes

Bro, it worked for me so i thank you so much. i really appreciate your help.

Message 26 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

1. Copy your minsert block to a blank file.

2. Export the drawing as .wmf (windows metafile)

3. Open a new empty drawing

4. Insert the .wmf file

5. The MINSERT BLOCK now appear as Block reference

6. Explode

7. Some entities may be lost but work with the drawing lines

1. Copy your minsert block to a blank file.

2. Export the drawing as .wmf (windows metafile)

3. Open a new empty drawing

4. Insert the .wmf file

5. The MINSERT BLOCK now appear as Block reference

6. Explode

7. Some entities may be lost but work with the drawing lines

Message 27 of 37
ksreekumar
in reply to: Anonymous

ksreekumar
Explorer
Explorer
Wow, this is amazing, thank you for the best idea....
0 Likes

Wow, this is amazing, thank you for the best idea....
Message 28 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

Select your object then write the command, FLATTEN then enter, then it will ask you remove hidden lines ?

write command : YES. 

its now break but same time it will move automatically from its existing place and it size also will be change.  

0 Likes

Select your object then write the command, FLATTEN then enter, then it will ask you remove hidden lines ?

write command : YES. 

its now break but same time it will move automatically from its existing place and it size also will be change.  

Message 29 of 37
Anonymous
in reply to: steve216586

Anonymous
Not applicable

use fllaten command and yes

0 Likes

use fllaten command and yes

Message 30 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

flatten command & yes

 

0 Likes

flatten command & yes

 

Message 31 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

Select your object and use FLATTEN command and ender, and and write command yes.

0 Likes

Select your object and use FLATTEN command and ender, and and write command yes.

Message 32 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

Thanks a lot

it really works on my autocad 2012

0 Likes

Thanks a lot

it really works on my autocad 2012

Message 33 of 37
Anonymous
in reply to: kylei7449

Anonymous
Not applicable

it works 100% 

0 Likes

it works 100% 

Message 34 of 37
yaxgaustria
in reply to: Anonymous

yaxgaustria
Explorer
Explorer
This solution works, thanks
0 Likes

This solution works, thanks
Message 35 of 37
ar683707
in reply to: Anonymous

ar683707
Community Visitor
Community Visitor

This worked great, thank you!

0 Likes

This worked great, thank you!

Message 36 of 37

surajkumarverma93
Community Visitor
Community Visitor

Ha Ha Ha😂😂

 

I have found the solution 

Type a Command in Command line "FLATTEN" Enter
Select MInsert Block Enter
Type "Y" Enter and wait some second 

BOOM BOOM Problem solve 😉

Thanks me Later🤗

If you have any other problem message to me 

0 Likes

Ha Ha Ha😂😂

 

I have found the solution 

Type a Command in Command line "FLATTEN" Enter
Select MInsert Block Enter
Type "Y" Enter and wait some second 

BOOM BOOM Problem solve 😉

Thanks me Later🤗

If you have any other problem message to me 

Message 37 of 37

Kent1Cooper
Consultant
Consultant

@surajkumarverma93 wrote:

.... I have found the solution 

Type a Command in Command line "FLATTEN" Enter
Select MInsert Block Enter
Type "Y" .... 


[This was already suggested here five times, in Messages 18, 28, 29, 30 & 31.  Please read through a topic before replying, to avoid adding something completely redundant.]

Kent Cooper, AIA
0 Likes


@surajkumarverma93 wrote:

.... I have found the solution 

Type a Command in Command line "FLATTEN" Enter
Select MInsert Block Enter
Type "Y" .... 


[This was already suggested here five times, in Messages 18, 28, 29, 30 & 31.  Please read through a topic before replying, to avoid adding something completely redundant.]

Kent Cooper, AIA

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report