Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
william
in reply to: william

ok never mind, it was easier than I thought. 

 

ThisApplication.StatusBarText = "Select a Face"
Dim doc = ThisApplication.ActiveDocument
Dim entity = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Select a Face")

doc.SelectSet.Select(entity)

Dim oFace As Face
oFace = doc.SelectSet(1)
	If Not oFace.SurfaceType = SurfaceTypeEnum.kPlaneSurface Then
		MessageBox.Show("A planar face must be selected, the rule will exit", "Error Handling")
		Return
	End If

strTest = oFace.SurfaceBody.Name

MessageBox.Show("Name = " & strTest, "Title")