<?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: Create Labels for Crossing Pipes in Profile View using C# in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11694027#M4309</link>
    <description>&lt;P&gt;The following is a quick example of labeling the structures and pipes within a ProfileView. The PipeOverride and the StructureOverride both provide properties that point back to the part (pipe or structure). I am writing in vb.net, but this can easily be converted to C#.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; &amp;lt;CommandMethod("PvLblPipeStructs")&amp;gt;
Public Sub CmdPvLblPipeStructs()
   GetCurrent() 'CommandBase - Sets Private aDoc, db, and ed

   Dim opt As New PromptEntityOptions(vbCrLf &amp;amp; "Select ProfileView: ")
   opt.SetRejectMessage(vbCrLf &amp;amp; "Selected entity must be a ProfileView. Try Again")
   opt.AddAllowedClass(GetType(ProfileView), True)

   Dim res As PromptEntityResult = ed.GetEntity(opt)

   If res.Status &amp;lt;&amp;gt; PromptStatus.OK Then Exit Sub

   Using tr As Transaction = db.TransactionManager.StartTransaction
      Dim pv As ProfileView = tr.GetObject(res.ObjectId, OpenMode.ForRead)

      For Each po As PipeOverride In pv.PipeOverrides
         PipeProfileLabel.Create(po.PipeId, pv.ObjectId)
      Next

      For Each so As StructureOverride In pv.StructureOverrides
         StructureProfileLabel.Create(pv.ObjectId, so.StructId)
      Next

      tr.Commit()
   End Using
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It bugs me that the arguments for the two functions, PipeProfileLabel.Create and StructureProfileLabel.Create, each have two agruments, a partId (pipe or structure respectively) and a profileView ObjectId. However, they are in different order for each function. I feel the order of the arguments should be that same for both functions. That's just my two cents.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2023 17:42:53 GMT</pubDate>
    <dc:creator>hippe013</dc:creator>
    <dc:date>2023-01-20T17:42:53Z</dc:date>
    <item>
      <title>Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11680563#M4307</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a tool to generate crossing pipe labels for the profile view. But I didn't know if there's a possibility to identify the crossing pipe in the profile view.&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;LI-CODE lang="general"&gt;void CreateProfileViewLabel(Transaction tr, ObjectId profViewId, ObjectId PartId)
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            Database db = doc.Database;
            var civdoc = CivilApplication.ActiveDocument;

            acc3db.ProfileView pview = (acc3db.ProfileView)tr.GetObject(profViewId, OpenMode.ForRead);
            var labelStyleID = civdoc.Styles.LabelSetStyles.ProfileLabelSetStyles["Standard"];
            var PipeStyleID = civdoc.Styles.PipeStyles["Crossing"];

            

            //acc3db.PipeProfileLabel.Create(PartId, profViewId, .5, labelStyleID);

            var o = tr.GetObject(PartId, OpenMode.ForWrite);
            var pv = tr.GetObject(profViewId, OpenMode.ForWrite);

            if (o is acc3db.ProfileViewPart &amp;amp;&amp;amp; pv is acc3db.ProfileView)
            {
                acc3db.ProfileViewPart mPart = o as acc3db.ProfileViewPart;
                acc3db.ProfileView mPV = pv as acc3db.ProfileView;

                

                foreach (var mPipe in mPV.PipeOverrides)
                {
                    mPipe.OverrideStyleId = PipeStyleID;
                    System.Diagnostics.Debug.Print("Draw: " + mPipe.Draw.ToString());
                    
                    
                }


                acc3db.StructureProfileLabel.Create(profViewId, PartId);
            }
        }&lt;/LI-CODE&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;Is it possible to identify the Crossing Pipes in the PipeOverrides from ProfileView?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then once it is detected, it will create label with the Pipe Diameter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 12:53:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11680563#M4307</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2023-01-16T12:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11693712#M4308</link>
      <description>&lt;P&gt;Deleted by author.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 15:57:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11693712#M4308</guid>
      <dc:creator>ChrisRS</dc:creator>
      <dc:date>2023-01-20T15:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11694027#M4309</link>
      <description>&lt;P&gt;The following is a quick example of labeling the structures and pipes within a ProfileView. The PipeOverride and the StructureOverride both provide properties that point back to the part (pipe or structure). I am writing in vb.net, but this can easily be converted to C#.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; &amp;lt;CommandMethod("PvLblPipeStructs")&amp;gt;
Public Sub CmdPvLblPipeStructs()
   GetCurrent() 'CommandBase - Sets Private aDoc, db, and ed

   Dim opt As New PromptEntityOptions(vbCrLf &amp;amp; "Select ProfileView: ")
   opt.SetRejectMessage(vbCrLf &amp;amp; "Selected entity must be a ProfileView. Try Again")
   opt.AddAllowedClass(GetType(ProfileView), True)

   Dim res As PromptEntityResult = ed.GetEntity(opt)

   If res.Status &amp;lt;&amp;gt; PromptStatus.OK Then Exit Sub

   Using tr As Transaction = db.TransactionManager.StartTransaction
      Dim pv As ProfileView = tr.GetObject(res.ObjectId, OpenMode.ForRead)

      For Each po As PipeOverride In pv.PipeOverrides
         PipeProfileLabel.Create(po.PipeId, pv.ObjectId)
      Next

      For Each so As StructureOverride In pv.StructureOverrides
         StructureProfileLabel.Create(pv.ObjectId, so.StructId)
      Next

      tr.Commit()
   End Using
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It bugs me that the arguments for the two functions, PipeProfileLabel.Create and StructureProfileLabel.Create, each have two agruments, a partId (pipe or structure respectively) and a profileView ObjectId. However, they are in different order for each function. I feel the order of the arguments should be that same for both functions. That's just my two cents.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 17:42:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11694027#M4309</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2023-01-20T17:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11696470#M4310</link>
      <description>&lt;P&gt;Thank you for the reply. How would I determine the crossing pipe? My plan is to create labels for the crossing pipe.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2023 06:53:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11696470#M4310</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2023-01-22T06:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11696975#M4311</link>
      <description>&lt;P&gt;Can you explain further what you mean when you say crossing pipe? If you mean a pipe that crosses the alignment and is shown in the profile view, then it is simply a pipe that when using the start and end points of the pipe you will get a positive and negative offset when using the StationOffset method of the alignment.&amp;nbsp; Or better yet, are you able to post a drawing?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2023 15:41:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11696975#M4311</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2023-01-22T15:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11697072#M4312</link>
      <description>&lt;P&gt;I drafted up a function to determine if the pipe crosses the alignment. Let me know if this what you had in mind.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Public Function PipeCrossesAlignment(pipeOverridePipeId As ObjectId, alignId As ObjectId) As Boolean
   Dim ret As Boolean = False

   'Get Pipe
   Dim part As ProfileViewPart = pipeOverridePipeId.GetObject(OpenMode.ForRead)
   Dim pipe As Pipe = part.ModelPartId.GetObject(OpenMode.ForRead)

   Dim sp As New Point3d(pipe.StartPoint.X, pipe.StartPoint.Y, 0)
   Dim ep As New Point3d(pipe.EndPoint.X, pipe.EndPoint.Y, 0)

   'Get Alignment
   Dim align As Alignment = alignId.GetObject(OpenMode.ForRead)

   Using line As New Line(sp, ep)
      Using pntCol As New Point3dCollection
         align.IntersectWith(line, Intersect.OnBothOperands, pntCol, IntPtr.Zero, IntPtr.Zero)
         If pntCol.Count &amp;gt; 0 Then
            ret = True
         End If
      End Using
   End Using

   Return ret
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can be used as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Using tr As Transaction = db.TransactionManager.StartTransaction
   Dim pv As ProfileView = tr.GetObject(res.ObjectId, OpenMode.ForRead)

   For Each po As PipeOverride In pv.PipeOverrides
      If PipeCrossesAlignment(po.PipeId, pv.AlignmentId) Then
         PipeProfileLabel.Create(po.PipeId, pv.ObjectId)
      End If
   Next

   tr.Commit()
End Using&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2023 17:22:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11697072#M4312</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2023-01-22T17:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699380#M4313</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1633394"&gt;@hippe013&lt;/a&gt;&amp;nbsp;This works for most crossing pipes (I came up with essentially the same thing in c# as an extension method for profileview) however it does not account for pipes that cross the alignment at a slight angle. Say you have a pipe which is 300' long and starts at 2' left and ed at 5' right. This will typically just be shown as a 'normal' pipe in profile, not a crossing pipe. I started working on a change to my code to have the extension method include an argument for the minimum angle to use to define a pipe as a crossing, but ran out of time to complete it. Perhaps I can get back to it this evening.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 16:44:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699380#M4313</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2023-01-23T16:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699415#M4314</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;&amp;nbsp;I am a little confused. What, precisely, defines a crossing pipe? Are you saying that if the pipe, more or less, runs with the profile / alignment direction, that you would want to exclude that as a crossing pipe? Where my definition (according to the code) would be anything that actually cross the alignment centerline.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 16:54:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699415#M4314</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2023-01-23T16:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699477#M4315</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1633394"&gt;@hippe013&lt;/a&gt;&amp;nbsp;Yes, it doesn't occur often, but it does occur. In this screenshot, the sewer line crosses over the centerline of an arced alignment. However, it should not, and does not, display as a crossing pipe in profile.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-01-23_9-12-59.png" style="width: 559px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1166036iDFD72434E8A02E90/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-01-23_9-12-59.png" alt="2023-01-23_9-12-59.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 17:17:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699477#M4315</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2023-01-23T17:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699519#M4316</link>
      <description>&lt;P&gt;Okay, I think I get it now. For a crossing pipe you will apply a pipe style different from that of&amp;nbsp; a pipe that is running along the alignment. Correct? I can see where my code would then falsely identify a crossing pipe that is actually going along the alignment.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 17:33:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699519#M4316</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2023-01-23T17:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699549#M4317</link>
      <description>Yes, exactly! Another case may be where a road crosses over a small drainage swale which is picked up with a culvert which runs askew to the alignment at a 45 degree angle. This would likely also be shown as the full pipe vs a crossing style.</description>
      <pubDate>Mon, 23 Jan 2023 17:42:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11699549#M4317</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2023-01-23T17:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11700811#M4318</link>
      <description>&lt;P&gt;In my sample drawing. They have different alignments but a similar style that they used. I was thinking to check the distance of the start point and end point of the pipe to the alignment to determine the crossing pipe. But I don't know if that is reliable to distinguish the crossing pipe.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alexisgacia_0-1674538512817.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1166270i49D99B4C5DF71F98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alexisgacia_0-1674538512817.png" alt="alexisgacia_0-1674538512817.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 05:39:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/11700811#M4318</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2023-01-24T05:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12029747#M4319</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1633394"&gt;@hippe013&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In your code you are using&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; PipeProfileLabel.Create&lt;/PRE&gt;&lt;P&gt;This command creates a label of PlanProfile style&lt;/P&gt;&lt;P&gt;For Civil 3D PlanProfile and CrossingProfile is a different style types.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you'll try to create a label with this method and with styleId from CrossingProfileLabels:&lt;/P&gt;&lt;P&gt;civilDoc.Styles.LabelStyles.PipeLabelStyles.CrossProfileLabelStyles&lt;/P&gt;&lt;P&gt;You will get error:&amp;nbsp;"Value does not fall within the expected range"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to create a label with a style from&amp;nbsp;CrossProfileLabelStyles?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps. For tests i created two label via Civil commands and then i picked them in selection set to check their type so:&lt;/P&gt;&lt;P&gt;Label with PlanProfileLabelStyle - goes to PipeProfileLabel class&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you try to create a lable with styleId from CrossingProfileLabels:&lt;/P&gt;&lt;P&gt;civilDoc.Styles.LabelStyles.PipeLabelStyles.CrossProfileLabelStyles&lt;/P&gt;&lt;P&gt;You will get error:&amp;nbsp;"Value does not fall within the expected range"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to create a label with a style from&amp;nbsp;CrossProfileLabelStyles?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps. For tests i created two label via Civil commands and then i picked them in selection set to check their type.&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;Label with PlanProfileLabelStyle - goes to PipeProfileLabel class&lt;/P&gt;&lt;P&gt;Label with CrossProfileLabelStyle - goes to Label class&lt;/P&gt;&lt;P&gt;PipeProfileLabel has a nice .Create Method, but Label Class has basic .Create method with (intPtr,bool)&lt;/P&gt;&lt;P&gt;Pss. i'm using 2021 version of Civil 3D&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 08:19:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12029747#M4319</guid>
      <dc:creator>pozhidaevdn</dc:creator>
      <dc:date>2023-06-13T08:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12030666#M4320</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3982912"&gt;@pozhidaevdn&lt;/a&gt;&amp;nbsp;The code I've posted above is simply example code for the purpose of seeking out a solution to the OP's original question. It is NOT production code. If you read through the thread you will see that we were attempting to identify which parts are considered crossing pipes and therefor should be labeled accordingly.&amp;nbsp; I have not found a way to label crossing parts in the profileview nor have I figuered out what Civil 3d uses to determine what should be considered crossing part.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 14:16:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12030666#M4320</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2023-06-13T14:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12030890#M4321</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3982912"&gt;@pozhidaevdn&lt;/a&gt;&amp;nbsp;As of C3D 2024 the PipeCrossingProfile label has not been fully exposed in the .NET API. Therefor we cannot create a label of this type at this time.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 15:32:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12030890#M4321</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2023-06-13T15:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12389702#M4322</link>
      <description>&lt;P&gt;You gentlemen seem to understand pipe/structure profile labels quite well.&amp;nbsp; Can you shed some light on moving and or setting location for PipeProfileLabels and StructureProfileLabels, please.&amp;nbsp; I just don’t think I understand the grips and snaps etc.&amp;nbsp; My goal is to programmatically modify the label locations on the profile to be staggered.&amp;nbsp; See the example in the following thread.&amp;nbsp; Any help would be greatly appreciated. &lt;A href="https://www.theswamp.org/index.php?topic=58697.msg616987#msg616987" target="_blank"&gt;https://www.theswamp.org/index.php?topic=58697.msg616987#msg616987&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 21:47:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12389702#M4322</guid>
      <dc:creator>jklinkeB8EEG</dc:creator>
      <dc:date>2023-11-20T21:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12391022#M4323</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13275292"&gt;@jklinkeB8EEG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/CIV3D/2024/ENU/?guid=d0c773da-cb4b-d9f8-19e3-d751763de52e" target="_blank"&gt;https://help.autodesk.com/view/CIV3D/2024/ENU/?guid=d0c773da-cb4b-d9f8-19e3-d751763de52e&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="00.JPG" style="width: 771px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1295428i21F996C811C714F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="00.JPG" alt="00.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.JPG" style="width: 699px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1295431iC9455D8473FB3631/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.JPG" alt="11.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:38:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12391022#M4323</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2023-11-21T11:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12405795#M4324</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StructureLabelGraphics.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1298208i5749C8BFC6D48BD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StructureLabelGraphics.png" alt="StructureLabelGraphics.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm sorry, but I really want to recreate the above programmatically.&amp;nbsp; Plus I'm just not understanding how to use the DraggedOffset function either.&amp;nbsp; I am either not smart enough, or just can't seem to grasp how to use the help functions and know how to apply them.&amp;nbsp; I can see from above your DraggedOffset as a Vector3d, but I don't know how to modify or set.&amp;nbsp; I'm really just a Civil Engineer Hacker and I just can't understand how you guys get anything from the help files. I would not be able to accomplish the above goal without adding vertexes and manipulating the label structure so any guidance on the aspects of leader locations or whatever it takes to replicate the above would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:30:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12405795#M4324</guid>
      <dc:creator>jklinkeB8EEG</dc:creator>
      <dc:date>2023-11-28T15:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12406744#M4325</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13275292"&gt;@jklinkeB8EEG&lt;/a&gt;&amp;nbsp;John, I'm afraid that what you are wanting to do is not quite possible with the current state of the API. You CAN set the LabelLocation (The DraggedOffset has been deprecated) but I am not seeing any way to add/remove vertices in the leader. Also, as with manually dragging the label, the attachment point of the leader is at the center of the structure, not the top or bottom as the label is originally placed.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;        [CommandMethod("DragStructureProfileLabel")]
        public void Dragstructureprofilelabel()
        {
            var doc = Application.DocumentManager.MdiActiveDocument;
            var ed = doc.Editor;
            var db = doc.Database;
            var prEnt = new PromptEntityOptions("\nSelect StructureProfileLabel to drag:");
            prEnt.SetRejectMessage("..not a correct label type, try again.");
            prEnt.AddAllowedClass(typeof(StructureProfileLabel), true);
            var selEnt = ed.GetEntity(prEnt);
            if (selEnt.Status != PromptStatus.OK)
                return;
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                var lbl = (StructureProfileLabel)tr.GetObject(selEnt.ObjectId, OpenMode.ForWrite);
                lbl.ResetLocation();
                lbl.LabelLocation = lbl.LabelLocation.TransformBy(Matrix3d.Displacement(new Vector3d(0, -15.0, 0.0)));
                //try to add a vertex by using a second move, doesn't work
                lbl.LabelLocation = lbl.LabelLocation.TransformBy(Matrix3d.Displacement(new Vector3d(10, 0.0, 0.0)));
                tr.Commit();
            }
        }
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 22:04:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12406744#M4325</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2023-11-28T22:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create Labels for Crossing Pipes in Profile View using C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12426997#M4326</link>
      <description>Thank you so much for looking into this. With how these labels need to be adjusted/staggard so many times, I would have thought this would be something we could modify. How do people accomplish stacking labels like these?&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Dec 2023 22:06:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/create-labels-for-crossing-pipes-in-profile-view-using-c/m-p/12426997#M4326</guid>
      <dc:creator>jklinkeB8EEG</dc:creator>
      <dc:date>2023-12-07T22:06:04Z</dc:date>
    </item>
  </channel>
</rss>

