<?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 Plant 3D API - &amp;quot;Rotation&amp;quot; of a Structual Column ? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/plant-3d-api-quot-rotation-quot-of-a-structual-column/m-p/7172231#M30871</link>
    <description>&lt;P&gt;I have selected two Structure members (see attachment) and am trying to obtain the "rotation" or "Angle" of each column. When drawing them manually, I specified an "Angle" of 0 or 90 degrees for these members, which gave them the appearances shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would I programmatically obtain the angle of each member? Thus far I have iterated thru the properties obtained from the DataLinksManager and can get the Entity object but nowhere do I see and Angle or Orientation property. Here's my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim tv(0) As TypedValue
tv(0) = New TypedValue(0, "ACPPSTRUCTUREBEAM")
Dim selFil As New SelectionFilter(tv)

Dim ed As Editor = acApp.DocumentManager.MdiActiveDocument.Editor
ed.WriteMessage("\nSelect structural members: ")
Dim pRes As PromptSelectionResult = ed.GetSelection(selFil)

If Not IsNothing(pRes.Value) Then
        Dim oPrj As PipingProject = PlantApplication.CurrentProject.ProjectParts("Piping")
        Dim dlm As DataLinksManager = oPrj.DataLinksManager

        Dim objID As ObjectId = Nothing
        Dim objIDs() As ObjectId = pRes.Value.GetObjectIds
        For obj As Short = 0 To objIDs.Length - 1

              objID = objIDs(obj)
              Dim props As List(Of KeyValuePair(Of String, String)) = dlm.GetAllProperties(objID, True)
              Dim sKey As String = String.Empty, sVal As String = String.Empty

              Using tr As Transaction = db.TransactionManager.StartTransaction
                  Dim ent As Entity = tr.GetObject(objID, OpenMode.ForRead)
'TRYING TO GET ANGLE VIA Entity...
              End Using

             For i As Short = 0 To props.Count - 1
                  sKey = props(i).Key
                  sVal = props(i).Value
                  Debug.Print(sKey + ":" + sVal)
 'TRYING TO GET ANGLE VIA THESE PROPERTIES...
              Next
End If&lt;/PRE&gt;
&lt;P&gt;Cheers!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jun 2017 20:43:53 GMT</pubDate>
    <dc:creator>MarkSanchezSPEC</dc:creator>
    <dc:date>2017-06-22T20:43:53Z</dc:date>
    <item>
      <title>Plant 3D API - "Rotation" of a Structual Column ?</title>
      <link>https://forums.autodesk.com/t5/net-forum/plant-3d-api-quot-rotation-quot-of-a-structual-column/m-p/7172231#M30871</link>
      <description>&lt;P&gt;I have selected two Structure members (see attachment) and am trying to obtain the "rotation" or "Angle" of each column. When drawing them manually, I specified an "Angle" of 0 or 90 degrees for these members, which gave them the appearances shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would I programmatically obtain the angle of each member? Thus far I have iterated thru the properties obtained from the DataLinksManager and can get the Entity object but nowhere do I see and Angle or Orientation property. Here's my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim tv(0) As TypedValue
tv(0) = New TypedValue(0, "ACPPSTRUCTUREBEAM")
Dim selFil As New SelectionFilter(tv)

Dim ed As Editor = acApp.DocumentManager.MdiActiveDocument.Editor
ed.WriteMessage("\nSelect structural members: ")
Dim pRes As PromptSelectionResult = ed.GetSelection(selFil)

If Not IsNothing(pRes.Value) Then
        Dim oPrj As PipingProject = PlantApplication.CurrentProject.ProjectParts("Piping")
        Dim dlm As DataLinksManager = oPrj.DataLinksManager

        Dim objID As ObjectId = Nothing
        Dim objIDs() As ObjectId = pRes.Value.GetObjectIds
        For obj As Short = 0 To objIDs.Length - 1

              objID = objIDs(obj)
              Dim props As List(Of KeyValuePair(Of String, String)) = dlm.GetAllProperties(objID, True)
              Dim sKey As String = String.Empty, sVal As String = String.Empty

              Using tr As Transaction = db.TransactionManager.StartTransaction
                  Dim ent As Entity = tr.GetObject(objID, OpenMode.ForRead)
'TRYING TO GET ANGLE VIA Entity...
              End Using

             For i As Short = 0 To props.Count - 1
                  sKey = props(i).Key
                  sVal = props(i).Value
                  Debug.Print(sKey + ":" + sVal)
 'TRYING TO GET ANGLE VIA THESE PROPERTIES...
              Next
End If&lt;/PRE&gt;
&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 20:43:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plant-3d-api-quot-rotation-quot-of-a-structual-column/m-p/7172231#M30871</guid>
      <dc:creator>MarkSanchezSPEC</dc:creator>
      <dc:date>2017-06-22T20:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Plant 3D API - "Rotation" of a Structual Column ?</title>
      <link>https://forums.autodesk.com/t5/net-forum/plant-3d-api-quot-rotation-quot-of-a-structual-column/m-p/7172755#M30872</link>
      <description>Unfortunately, there is no access to structural members through the API. You can get some info from the P3D structural data table but not rotation.</description>
      <pubDate>Fri, 23 Jun 2017 03:00:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plant-3d-api-quot-rotation-quot-of-a-structual-column/m-p/7172755#M30872</guid>
      <dc:creator>jabowabo</dc:creator>
      <dc:date>2017-06-23T03:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Plant 3D API - "Rotation" of a Structual Column ?</title>
      <link>https://forums.autodesk.com/t5/net-forum/plant-3d-api-quot-rotation-quot-of-a-structual-column/m-p/7173758#M30873</link>
      <description>&lt;P&gt;Oh, that's right! I've been learning both Plant 3D and Revit here and did come across that fact a while back. Thanks for the answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 13:32:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plant-3d-api-quot-rotation-quot-of-a-structual-column/m-p/7173758#M30873</guid>
      <dc:creator>MarkSanchezSPEC</dc:creator>
      <dc:date>2017-06-23T13:32:15Z</dc:date>
    </item>
  </channel>
</rss>

