Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

How to get the child of the selected sketch

Status
Not open for further replies.

Balaji R

Automotive
Jul 27, 2022
5
0
0
IN
Hello,
Can anyone please help me to get the child (Ex: Pad) geometry of the selected sketch.

I tried this but it does not works.

Sub CATIMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = partDocument1.Selection

selection1.Search "Name = Any Sketch name"

Dim MyVAlue1
Set MyVAlue1 = selection1.Item(1).Value

Dim Child1
Child1 = MyVAlue1.GetChild

MsgBox Child1.Name

End Sub

 
Status
Not open for further replies.
Back
Top