Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA: SelectElement2 Error

Status
Not open for further replies.

raju3444

Aerospace
Jan 9, 2008
15
Hi,
I am trying to use the selectelement2 method but i am getting the following error.

"Function used is marked as restricted or uses a type not supported in Visual Basic"

The code i have written is-
--------------------------------------------------
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument

Dim part1 As Part
Set part1 = partDocument1.Part

Dim InputObjectType(0), Status
InputObjectType(0) = "Sketch"

Dim mySelection As Selection
Set mySelection = partDocument1.Selection

Status = mySelection.SelectElement2(InputObjectType(0), "Select Sketch: ", True)
------------------------------------------------------
Can anybody giude me how to correct it. Thanks you in advance.
-Raj
 
Replies continue below

Recommended for you

NOT THIS
Dim mySelection As Selection

THIS
Dim mySelection As object
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor