AutoCAD Plant 3D Forum
Welcome to Autodesk’s AutoCAD Plant 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Plant 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Autocad Plant3D Pipe tessellation issue

0 REPLIES 0
Reply
Message 1 of 1
Ravi_Lagad
334 Views, 0 Replies

Autocad Plant3D Pipe tessellation issue

I have created a  Autocad Plant3D test plug-In using C# . In this code, I have to access triangulated data of a pipe object.

It gets compiled, but at run time throws an exception as in attached image.

 

Database db = Application.DocumentManager.MdiActiveDocument.Database;
using (Transaction transaction = db.TransactionManager.StartTransaction())
            {
                BlockTableRecord btRecord = (BlockTableRecord)transaction.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(db), OpenMode.ForWrite);
                foreach (ObjectId id in btRecord)
                {
                    DBObject tDBObject = (DBObject)transaction.GetObject(id, OpenMode.ForWrite);
                    if (tDBObject is Pipe)
                    {
                        Pipe tpipe = tDBObject as Pipe;
                        tBrep = new Brep(tpipe);            //Throws an exception on this line.

                    }

                }

           }



Please let me know where i am making a mistake and also, if any other way to access Pipe tessellation.

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report

”Boost