Product : Engine, Version : 4.1.6.1028, ArticleID : 41023357

HowTo : Can 3dFace be selected by clicking on the face(Not the edge)?

Article41023357
TypeHowTo
ProductEngine
Version4.1.6.1028
Date Added12/31/2003
Submitted byTakis Panagiotopoulos
Keywords

Subject

Can 3dFace be selected by clicking on the face(Not the edge)?

Summary

Can 3dface be selected by clicking on the face(Not the edge)?

Solution

You can do this with Get3dEntityFromPOINT . However if you are in plan world you have to set View3D mode to render or hide etc. Also you can select the 3dface if you are change the view to a non plan world mode (VISW for example )
Option Explicit

Private Sub Command1_Click()
    vdraw.CommandAction.View3D "SHADE" 'HIDE,RENDER etc (PLAN WORLD)
End Sub

Private Sub Command2_Click()
    vdraw.CommandAction.View3D "VISW" 'VINE etc (NONE PLAN WORLD)
End Sub

Private Sub Form_Load()
    vdraw.ActiveDocument.Open App.Path + "/vectordraw.dwg"
End Sub

Private Sub vdraw_MouseDown(Button As Integer, Shift As Integer, x As Double, y As Double)
    Dim ent As vdFigure

If Button = 1 Then
    Set ent = vdraw.ActiveDocument.Get3dEntityFromPOINT(vdraw.CursorPos)
    If Not ent Is Nothing Then
        If ent.Type = "VD3DFACE" Then
            MsgBox "3d face selected"
        End If
    End If
    
End If
End Sub