<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Exploding 3D Objects in a Side Database with the Core Console. in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968892#M37608</link>
    <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;do, you did a test with the command: -exporttoautocad?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;are these custom objects in-house? or some autodesk vertical?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;make the test to export them with the command above, and post a drawing sample here, i may have a chance to run a test here, or also any of the other members here, may give a try too.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;hth.-&lt;/P&gt;</description>
    <pubDate>Wed, 30 Dec 2015 21:36:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-12-30T21:36:37Z</dc:date>
    <item>
      <title>Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968185#M37603</link>
      <description>&lt;P&gt;Good morning everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got a question in regards to performing some specific explode commands. &amp;nbsp;You see, I'm putting together a routine that will take all the "Equipment" objects from one of our drawings, put them in indivudal DWG files and explode them. &amp;nbsp;I'm doing this so they can be imported into Revit. &amp;nbsp;This is all currently being done in the AutoCAD Core Console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got the first two steps down. &amp;nbsp;Using the Core Console I can grab all of the Equipment objects I mentioned and then import them into their own individual DWG files, but I can't quite get the 'explode' to work. As of now, it just does nothing. &amp;nbsp;I need to explode these objects so they remove all their properties, but retain their 3D Geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code, it's wrapped in a foreach statement (not included), I'm currently using to try and get this to work, anyone have any suggestions/thoughts as to why it's not working?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using (Transaction tr = db.TransactionManager.StartTransaction())
                {
                    // Open new Database
                    using (Database newDb = new Database(true, true))
                    {
                        // Make collection for single object.
                        ObjectIdCollection coll =
                            new ObjectIdCollection();
                        coll.Add(thisEquipItem.ObjId);
                        
                        using (Transaction newTr = newDb.TransactionManager.StartTransaction())
                        {
                            // Get BlockTable/BlockTableRecord to insert model into newDb.
                            // For these to import correctly, they need to be imported into Model Space.
                            BlockTable bt =
                                newTr.GetObject(newDb.BlockTableId, OpenMode.ForRead) as BlockTable;
                            BlockTableRecord btr = 
                                newTr.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead) as BlockTableRecord;

                            IdMapping idMap = new IdMapping();
                            newDb.WblockCloneObjects(coll, btr.ObjectId, idMap, DuplicateRecordCloning.Ignore, false);

                            newTr.Commit();
                        }

                        // Explode the object.
                        using (Transaction exTr = newDb.TransactionManager.StartTransaction())
                        {
                            BlockTable exBt =
                                exTr.GetObject(newDb.BlockTableId, OpenMode.ForRead) as BlockTable;
                            BlockTableRecord exBtr =
                                exTr.GetObject(exBt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;

                            foreach (ObjectId obj in exBtr)
                            {
                                Entity ent = exTr.GetObject(obj, OpenMode.ForWrite) as Entity;
                                DBObjectCollection entitySet = new DBObjectCollection();
                                ent.Explode(entitySet);
                            }

                            exTr.Commit();
                        }

                        dwgName = exportPath + @"\" + number + ".dwg";
                        newDb.SaveAs(dwgName, DwgVersion.Current);
                    }

                    tr.Commit();
                }&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Dec 2015 13:39:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968185#M37603</guid>
      <dc:creator>mhillis</dc:creator>
      <dc:date>2015-12-30T13:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968770#M37604</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;did a quick look, after calling .Explode() the returned collection, needs to be added into the block table record (BTR), then you can .Erase() the solid. for example:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;foreach (Entity entity in entitySet)
{
   btr.AppendEntity(entity);
   tr.AddNewlyCreatedDBObject(entity, true);
}&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;hth.-&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 19:54:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968770#M37604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-30T19:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968816#M37605</link>
      <description>&lt;P&gt;LE3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, makes sense I forgot that. &amp;nbsp;Quick bump I've hit, I'll be looking at while I'm waiting on a reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the following code, my entitySet class comes up empty. &amp;nbsp;I've confirmed that the entity is there in it's respective variable. Any immediate ideas as to what might be causing that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; foreach (ObjectId obj in exBtr)
                            {
                                Entity ent = exTr.GetObject(obj, OpenMode.ForWrite) as Entity;
                                DBObjectCollection entitySet = new DBObjectCollection();
                                ent.Explode(entitySet);

                                foreach (Entity e in entitySet)
                                {
                                    exBtr.AppendEntity(e);
                                    exTr.AddNewlyCreatedDBObject(e, true);
                                }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 20:32:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968816#M37605</guid>
      <dc:creator>mhillis</dc:creator>
      <dc:date>2015-12-30T20:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968836#M37606</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;no idea, have been a while since i used autocad for production work... are these 3d solids explodable?, maybe custom objects? or from a vertical application? -- i will try with the command:&amp;nbsp;_.-EXPORTTOAUTOCAD first (in case you have autocad), and export the drawing with that first, then run your code again, and see if helps.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;hth.-&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 20:46:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968836#M37606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-30T20:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968857#M37607</link>
      <description>They are custom objects yes, however; I can explode them using the EXPLODE command and that gets me the result I am looking for.</description>
      <pubDate>Wed, 30 Dec 2015 21:01:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968857#M37607</guid>
      <dc:creator>mhillis</dc:creator>
      <dc:date>2015-12-30T21:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968892#M37608</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;do, you did a test with the command: -exporttoautocad?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;are these custom objects in-house? or some autodesk vertical?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;make the test to export them with the command above, and post a drawing sample here, i may have a chance to run a test here, or also any of the other members here, may give a try too.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;hth.-&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 21:36:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5968892#M37608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-30T21:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5974972#M37609</link>
      <description>&lt;P&gt;LE3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the EXPORTTOAUTOCAD commands appears to actually work great.&amp;nbsp; This gives me an object I can actually use!&amp;nbsp; The problem is incorporating it into the AutoCAD Core Console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You see, as the previous code example shows, I'm loading a doc, getting objects from that doc, and putting each object into it's own seperate database.&amp;nbsp; For the EXPORTAUTOCAD command to work, I need to run that within each database.&amp;nbsp; I can't just run it on the entireity of the original drawing, as I'm only needing to run this on specific objects. &amp;nbsp; I realize that I need to open each one of these objects as a document and then I can SendStringToExecute() from there, however; doing just that has me a little stumped.&amp;nbsp; It's my assumption the method for doing that would be to use the DocumentCollectionExtension routines to so I can add a document and import the database that way, however; that isn't available in the AutoCAD Core Console.&amp;nbsp; Unfortunately, I'm not immediately seeing another way to load my database into a document so I can run commands on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 02:07:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5974972#M37609</guid>
      <dc:creator>mhillis</dc:creator>
      <dc:date>2016-01-06T02:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5975615#M37610</link>
      <description>&lt;P&gt;My duh moment for the day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cadforum.cz/cadforum_en/command.asp?Core" target="_blank"&gt;http://www.cadforum.cz/cadforum_en/command.asp?Core&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As shown in the link above, the EXPORTTOAUTOCAD command is NOT available in the Core Console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CONVERTTO3DSOLIDS is though.&amp;nbsp; I think that achieves the exact same effect, however;&amp;nbsp; I'm still a little stumped as to how I'm gonna take a database like this and run commands on it in the Core Console.&amp;nbsp; Easy to do in full AutoCAD, little tricky here.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 14:44:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5975615#M37610</guid>
      <dc:creator>mhillis</dc:creator>
      <dc:date>2016-01-06T14:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5975891#M37611</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if i recall reading it, there was a list also on Kean Walmsley great source site:&amp;nbsp;&lt;A href="http://through-the-interface.typepad.com/" target="_blank"&gt;http://through-the-interface.typepad.com/&lt;/A&gt; - about the core console.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if these custom objects are in-house not autodesk verticals, maybe you can make a function to autolisp or c# side and make available the explode part of those custom objects, now i have no idea if one can run in the core console that as said previously not familiar with the core console et-al, others might provide better advice on this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;good luck. hth.-&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 16:26:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5975891#M37611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-06T16:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Exploding 3D Objects in a Side Database with the Core Console.</title>
      <link>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5976229#M37612</link>
      <description>&lt;P&gt;To all those interested.&amp;nbsp; I've figured this out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, what I have is an external application that will open a DWG (by utilizing the Core Console) and then export the equipment items out of that DWG as individual DWGs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My solution has been to have my application open up each DWG after the fact and run a script on that file.&amp;nbsp; In this case,&amp;nbsp; I simply change the view&amp;nbsp;of the drawing to Isometric, then run the explode command using that script.&amp;nbsp; Doing this gives me a DWG file with a piece of equipment exploded in just the fashion that I need it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks LE3 for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 19:03:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/exploding-3d-objects-in-a-side-database-with-the-core-console/m-p/5976229#M37612</guid>
      <dc:creator>mhillis</dc:creator>
      <dc:date>2016-01-06T19:03:54Z</dc:date>
    </item>
  </channel>
</rss>

