How can I use 'Project Objects To Profile View' with C#?

IgorRamosTPF
Explorer
Explorer

How can I use 'Project Objects To Profile View' with C#?

IgorRamosTPF
Explorer
Explorer

 

IgorRamosTPF_0-1719955117328.png

How can I use the 'Project Objects To Profile View' command using the Civil 3D API, with C#?

I have several CogoPoints, and I want to project those in a selected Profile View, and set the label style for different groups.

 

 

0 Likes
Reply
Accepted solutions (1)
315 Views
2 Replies
Replies (2)

hosneyalaa
Advisor
Advisor

refer to the Civil 3D .NET API Ref document, ProfileProjection class has only few properties exposed, create() is not exposed for public usage

 

Capture0.JPG

 

 

but can you see this

 

// https://forums.autodesk.com/t5/civil-3d-customization/vba-project-object-to-profile-view/m-p/5953577

Set PVObj = ThisDrawing.HandleToObject(PVHandle(i))

PVObj.GetBoundingBox Varmin, VarMax
ZoomWindow Varmin, VarMax
ThisDrawing.SendCommand "_AECCPROJECTOBJECTSTOPROF" & vbCr & "Previous" & vbCr & vbCr & Varmin(0) & "," & VarMax(1) & vbCr

 

 

 

IgorRamosTPF
Explorer
Explorer
Accepted solution

Thanks for the suggestion, I was having trouble using the Editor Command because the last parameter, the one for selecting the Styles, wasn't working. But I solved it this way:

 

IgorRamosTPF_0-1720012433211.png

 

the selection sets were created using SelectionSet.FromObjectIds.

 

In this way, it still shows this window, but no problem:

 

IgorRamosTPF_1-1720012978075.png

 

0 Likes