×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to select item within a selection

How to select item within a selection

How to select item within a selection

(OP)
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.

RE: How to select item within a selection

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

Regards

RE: How to select item within a selection

OK, I'm talking about CATIA Portable Script Center, you can search it with Google, I'm sure you can find it. If not, let me know so I will post a link to my DropBox....

Regards
Fernando

https://picasaweb.google.com/102257836106335725208

RE: How to select item within a selection

(OP)
Thanks Fernando,

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

Regards

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources