Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
ktucker86UDQ
393 Views, 5 Replies

Set 3D view to section view through XY plane

I'm struggling to find the right object to use for setting a 3d view to a half-section view through the origin XY plane. Does anyone have advice for how to achieve? Coding in C#, but any VB.net sample could would help a bunch!

 

Thanks

A.Acheson
in reply to: ktucker86UDQ

Hi @ktucker86UDQ 

 

From the API help see link for  the DesignViewRepresentation object.

Syntax

DesignViewRepresentation.SetSectionViewSectionViewType As SectionViewTypeEnum, [FirstSectionPlane] As Variant, [SecondSectionPlane] As Variant )

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
ktucker86UDQ
in reply to: A.Acheson

Thanks, this helped a lot. Now I am struggling to find a reference to the XY plane of the origin. Ive tried using WorkPlanes, but this seems to only include user-defined workplanes.

 

Thanks

WCrihfield
in reply to: ktucker86UDQ

Hi @ktucker86UDQ.  Just so you are aware, the first 3 WorkPlanes, and the first 3 WorkAxes, and the first 1 WorkPoint in every model type document (parts & assemblies) are the ones that belong to the origin of that model.  They will be in the same order as you see them in the model tree.  The ones after that will be user defined ones.  There is a property you can check too (IsCoordinateSystemElement).

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

ktucker86UDQ
in reply to: ktucker86UDQ

Unfortunately, I am getting errors when I try to do a half section view across workplanes using the following code snippet:

 

Screenshot 2023-07-17 110601.png

ktucker86UDQ
in reply to: ktucker86UDQ

Resolved! I needed to put plane.Plane to grab the Plane object from the WorkPlane object.