Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

CATIA STARTCOMMAND loop for multiple surfces

Status
Not open for further replies.

NaWin55

Mechanical
Mar 21, 2020
98
Hi
i have been trying to use CATIA.StartCommand on UNTRIM command for multiple surfaces
i tried looping it but it is not working for multiple surface i tried adding the surfaces to selection or collection
and tried looping but script ran fine but only first element gets untrimmed

here is the code

set hyb2 = opart.hybridbodie.item("Extracts")

set oSel2 = catia.ActiveDocument.Selection
oSel2.clear

for i = 1 to hyb2.hybridshapes.count
oSel2.Add hyb2.HybridShapes.item(i)
CATIA.StartCommand "Untrim"
CATIA.RefreshDisplay = True
SendKeys "{ENTER}"
next
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor