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

@hkempeneers,

 

Below modification may be helpful in creating sketch after selection of face.

 

    Dim oFace As Face
    oFace = ThisApplication.CommandManager.Pick(kPartFacePlanarFilter, "Select a face")
    
    Dim occ As ComponentOccurrence
    occ = oFace.ContainingOccurrence
    
    Dim oFaceProxy As FaceProxy
    
    Call occ.CreateGeometryProxy(oFace, oFaceProxy)
    
    If oFaceProxy.SurfaceType = kPlaneSurface Then
        oSketch = oAssDef.Sketches.Add(oFaceProxy)
    End If

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network