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

Exploding Minsert blocks

34 REPLIES 34
SOLVED
Reply
Message 1 of 35
kylei7449
55413 Views, 34 Replies

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.

 

 

34 REPLIES 34
Message 21 of 35
Ed.Jobe
in reply to: dedeoxp

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 35
mafazjohburg
in reply to: kylei7449

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

Message 23 of 35
ksreekumar
in reply to: kylei7449

Greetings,

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

Message 24 of 35
redlink
in reply to: micromaxturbo1904

Thanks @micromaxturbo1904 .

 

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

 

Message 25 of 35
molivero8NDDT
in reply to: kylei7449

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

Message 26 of 35
zeromarmota
in reply to: kylei7449

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 35
ksreekumar
in reply to: zeromarmota

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

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 35
imriyaskalam
in reply to: steve216586

use fllaten command and yes

Message 30 of 35
imriyaskalam
in reply to: kylei7449

flatten command & yes

 

Message 31 of 35
imriyaskalam
in reply to: kylei7449

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

Message 32 of 35

Thanks a lot

it really works on my autocad 2012

Message 33 of 35
ahmad12sl
in reply to: kylei7449

it works 100% 

Message 34 of 35

This solution works, thanks
Message 35 of 35

This worked great, thank you!

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

Post to forums  

”Boost