PROFILE FROM POLYLINE

PROFILE FROM POLYLINE

cpusey
Contributor Contributor
44,244 Views
51 Replies
Message 1 of 52

PROFILE FROM POLYLINE

cpusey
Contributor
Contributor
I have a bunch of profiles with the finished grade shown with a polyline. I have to generate roadway corridors from these profiles (done by others) I am able to put there polylines in my profiles correctly and would like to convert the polyline to the finish grade proflie without having to click on every vertex. Can this be done?
Accepted solutions (1)
44,245 Views
51 Replies
Replies (51)
Message 2 of 52

Anonymous
Not applicable
In 2010 you can explode the polyline and add then add the individual lines to the design profile uinsg the "Convert AutoCAD Line and Spline" command. The only thing that starts to get tricky is the arcs/splines. I would just use the tangents and add any curves after the fact.

-Lou
Message 3 of 52

mjfarrell
Contributor
Contributor
sounds like you might try converting that polyline into a comma delimited TXT file that contains STA, Elevation, (Vertical Curve Optional), then use create profile from file, and import the TXT file to draw your FG profiles in the profile view grid.
0 Likes
Message 4 of 52

cpusey
Contributor
Contributor
Thanks to both of you.
0 Likes
Message 5 of 52

Sinc
Advisor
Advisor

> {quote:[email protected] wrote:}{quote}
> sounds like you might try converting that polyline into a comma delimited TXT file that contains STA, Elevation, (Vertical Curve Optional), then use create profile from file, and import the TXT file to draw your FG profiles in the profile view grid.

Spoken like a Map expert... 🙂

I actually don't know how you would manage that... converting the polyline into a Sta/Elev report would be tricky.

I'm partial to this solution myself. Just position the polyline on the profile view, then select it. Instant Profile. Well, as long as there are no vertical curves, anyway.

-- Sinc
http://www.ejsurveying.com
http://www.quuxsoft.com

Sinc
0 Likes
Message 6 of 52

Anonymous
Not applicable

If the OP knew the vertical scale exaggeration, one
could create an alignment along the profile datum line, create an empty
profile view over the alignment with the grid aligned to the dumb profile.
You can now either digitize on-screen or label the profile view to help create
the sta/elev file.

 

John
0 Likes
Message 7 of 52

Sinc
Advisor
Advisor
But if you're going to do all that, it would be much faster to just draw the whole Profile directly by picking each vertex, and forget about trying to create a Sta/Elev dump...

-- Sinc
http://www.ejsurveying.com
http://www.quuxsoft.com
Sinc
0 Likes
Message 8 of 52

Anonymous
Not applicable
This is something obvious that Civil3d and LDD has never picked up on. You have to jump through hoops to do it but it can be done.
0 Likes
Message 9 of 52

kh_night
Enthusiast
Enthusiast
Accepted solution

Hi

You can use this simple program! Type "NETLOAD" in command bar and load this DLL and type "PFP" in coammand bar and then select your polyline then select your Profile View. Of course your polyline must be in your ProfileView. If you have problem in netload or loading this dll, you must copy and paste or replace with second file ("acad.exe.config") and right click on ProfileToolBox.dll and go to properties and UNBLOCK this dll file.

Good LuckSmiley Wink

Message 10 of 52

Anonymous
Not applicable

This is just awesome....... solved too many issues


@kh_night wrote:

Hi

You can use this simple program! Type "NETLOAD" in command bar and load this DLL and type "PFP" in coammand bar and then select your polyline then select your Profile View. Of course your polyline must be in your ProfileView. If you have problem in netload or loading this dll, you must copy and paste or replace with second file ("acad.exe.config") and right click on ProfileToolBox.dll and go to properties and UNBLOCK this dll file.

Good LuckSmiley Wink



for me.....KUDOS!!!

Message 11 of 52

jaimexxxx
Observer
Observer

GRACIAS

 

0 Likes
Message 12 of 52

Anonymous
Not applicable

Hi this is what I got when I tried to load the dll:

"Command: NETLOAD
Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\txiao\Downloads\DLL\ProfileToolBox.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\txiao\Downloads\DLL\ProfileToolBox.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()"

 

then "PFP" won't work, can someone help me?

 

Thanks

Message 13 of 52

kh_night
Enthusiast
Enthusiast

Just right click on DLL file and select properties and click on Unblock button and then run this dll again with netload command.

0 Likes
Message 14 of 52

MGO-Norsyn
Advocate
Advocate

@kh_night wrote:

Hi

You can use this simple program! Type "NETLOAD" in command bar and load this DLL and type "PFP" in coammand bar and then select your polyline then select your Profile View. Of course your polyline must be in your ProfileView. If you have problem in netload or loading this dll, you must copy and paste or replace with second file ("acad.exe.config") and right click on ProfileToolBox.dll and go to properties and UNBLOCK this dll file.

Good LuckSmiley Wink


Hi

Thank you for sharing this tool. Sadly, it wasn't working for me, so I decompiled it and tried to fix the code. Which actually worked. I now have a working version for C3D 2019. See here.

demo.gif

Message 15 of 52

kh_night
Enthusiast
Enthusiast

I attach VS codes, You can share it with others

Message 16 of 52

MGO-Norsyn
Advocate
Advocate

Hi, thank you for sharing this source code.

But, as I outlined in my reverse engineering project found here, there are a couple of deficiencies in your code. In particular:

//Original
Profile oProfile = trans.GetObject(oProfileId, OpenMode.ForRead) as Profile;
//Should be
Profile oProfile = trans.GetObject(oProfileId, OpenMode.ForWrite) as Profile;

//Original
Point2d po = arcseg.GetSamplePoints(10)[6];
//Should be
Point2d po = arcseg.GetSamplePoints(11)[6];
Message 17 of 52

MGO-Norsyn
Advocate
Advocate

Ooops, in the previous post, the point selection arguments should be (11)[5]

Message 18 of 52

LK_Indy
Contributor
Contributor

Thanks for posting.  I downloaded and ran the command MYPFP.  When prompted to select the polyline, the program returns "Not a polyline".

 

I'm assuming operator error on my part somewhere in the process.  The polyline consists of only tangent sections (no curves)

 

Thanks,

 

Larry

 

 

0 Likes
Message 19 of 52

MMcCall402
Mentor
Mentor

Try converting it to light weight polyline.    (COVERTPOLY)

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

0 Likes
Message 20 of 52

Topmig
Advocate
Advocate

HI @LK_Indy ,

 

Did you unlock the DLL file?

For me, it worked perfectly in 2020!

0 Likes