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

PROFILE FROM POLYLINE

48 REPLIES 48
SOLVED
Reply
Message 1 of 49
cpusey
32224 Views, 48 Replies

PROFILE FROM POLYLINE

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?
48 REPLIES 48
Message 2 of 49
Anonymous
in reply to: cpusey

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 49
mjfarrell
in reply to: cpusey

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.
Message 4 of 49
cpusey
in reply to: cpusey

Thanks to both of you.
Message 5 of 49
Sinc
in reply to: cpusey

> {quote:title=mjfarrell@earthlink.net 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
Message 6 of 49
Anonymous
in reply to: cpusey


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
Message 7 of 49
Sinc
in reply to: cpusey

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
Message 8 of 49
Anonymous
in reply to: cpusey

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.
Message 9 of 49
kh_night
in reply to: cpusey

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 49
Anonymous
in reply to: kh_night

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 49
jaimexxxx
in reply to: kh_night

GRACIAS

 

Message 12 of 49
Anonymous
in reply to: kh_night

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 49
kh_night
in reply to: Anonymous

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

Message 14 of 49
MGO-Norsyn
in reply to: kh_night


@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 49
kh_night
in reply to: MGO-Norsyn

I attach VS codes, You can share it with others

Message 16 of 49
MGO-Norsyn
in reply to: kh_night

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 49
MGO-Norsyn
in reply to: MGO-Norsyn

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

Message 18 of 49
LK_Indy
in reply to: MGO-Norsyn

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

 

 

Message 19 of 49
MMcCall402
in reply to: LK_Indy

Try converting it to light weight polyline.    (COVERTPOLY)

Mark Mccall 
CAD Mangler



Hammer Land Engineering


Linkedin

Message 20 of 49
Topmig
in reply to: LK_Indy

HI @LK_Indy ,

 

Did you unlock the DLL file?

For me, it worked perfectly in 2020!

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report