<?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 How can I access subobject in Plant3d from CSharp? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-can-i-access-subobject-in-plant3d-from-csharp/m-p/3705690#M52423</link>
    <description>&lt;P&gt;I have a program in C# where i am trying to access a sub-object which is of type Connectors/fasteners.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a drawing, I have an object with class (PnPClassname) P3dConnector, and when I click on it's red circle with &amp;lt;ctrl&amp;gt; pressed, I access an object with class (PnPClassname) BoltSet. I have added the event oDatabase.ObjectModified, but this only access the P3dConnector-object, not the BoltSet-object. See the image and attached file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i access this sub-object? I have tried to loop through prompted result set using SelectAll. The P3dConnector-object is listed but not the BoltSet-object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Nov 2012 13:25:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-11-20T13:25:05Z</dc:date>
    <item>
      <title>How can I access subobject in Plant3d from CSharp?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-can-i-access-subobject-in-plant3d-from-csharp/m-p/3705690#M52423</link>
      <description>&lt;P&gt;I have a program in C# where i am trying to access a sub-object which is of type Connectors/fasteners.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a drawing, I have an object with class (PnPClassname) P3dConnector, and when I click on it's red circle with &amp;lt;ctrl&amp;gt; pressed, I access an object with class (PnPClassname) BoltSet. I have added the event oDatabase.ObjectModified, but this only access the P3dConnector-object, not the BoltSet-object. See the image and attached file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i access this sub-object? I have tried to loop through prompted result set using SelectAll. The P3dConnector-object is listed but not the BoltSet-object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2012 13:25:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-can-i-access-subobject-in-plant3d-from-csharp/m-p/3705690#M52423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-20T13:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access subobject in Plant3d from CSharp?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-can-i-access-subobject-in-plant3d-from-csharp/m-p/3707152#M52424</link>
      <description>&lt;P&gt;I am able to access the object by using following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp; using (Transaction tx = objId.Database.TransactionManager.StartTransaction())&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBObject dbObject = tx.GetObject(objId, OpenMode.ForRead);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Autodesk.ProcessPower.PnP3dObjects.Connector Conn = tx.GetObject(objId, OpenMode.ForRead) as Autodesk.ProcessPower.PnP3dObjects.Connector;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Conn != null)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach(Autodesk.ProcessPower.PnP3dObjects.SubPart sp in Conn.AllSubParts)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(sp.GetType().ToString());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;But the Conn.Id is 0. How do i get the object from a sub part?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2012 09:45:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-can-i-access-subobject-in-plant3d-from-csharp/m-p/3707152#M52424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-21T09:45:12Z</dc:date>
    </item>
  </channel>
</rss>

