.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
IgorRamosTPF
166 Views, 2 Replies

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

 

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.

 

 

2 REPLIES 2
Message 2 of 3
hosneyalaa
in reply to: IgorRamosTPF

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

 

 

 

Message 3 of 3
IgorRamosTPF
in reply to: IgorRamosTPF

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

 

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

Post to forums  

Forma Design Contest


AutoCAD Beta