Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

How to select item within a selection 1

Status
Not open for further replies.

masswts

Aerospace
Joined
Oct 4, 2012
Messages
3
Location
CA
Hi,

New to forum and vba coding,

I am trying to move through a search result collection, select each one then perform measure inertia.

Have managed to get search results, but stuck on how to select each in turn to so that I can analyse

Sub CATMain()

Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument
Dim part2 As Object
Dim selection1 As Selection
Set selection1 = productDocument1.Selection
Set selection2 = productDocument1.Selection
selection1.Search "Name=partbody,all"
Set selection1 = productDocument1.Selection
node_amount = selection1.Count
For node_count = 1 To node_amount

' selection1.Item(node_count)
' how to move through each of the found items in the search to enable measure inertia command????
CATIA.StartCommand ("Measure Inertia")

Next node_count
End Sub

Any help appreciated.

 
Thanks Fernando,
But when I click the link, there is no file.

Regards
 
Thanks Fernando,

Got the file, looks like some reading required !!!

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top