×
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

Catia Macro filtering

Catia Macro filtering

Catia Macro filtering

(OP)
Hi,

I need some help filtering off some CATPARTS.
I want to filter it out by the partname but when i use the * which i thought was a wildcard, Catia doesn't seem to like it the line and doesn't apply the rest of the code. Here's an example:

If objPartDocument.name = ("Multi*.CATPart") then
msgbox objPartDocument.name
Else
End if

Could someone help me out with this? thanks so much!


RE: Catia Macro filtering

Hi,

If you have few parts starting with Multi* , do a search using name as search criteria, include them in a collection, then extract the name for each item in collection.

To understand more about what you want, we should see a little bit more from your code but I suppose you want what I already wrote above.

Are you coding in vba , catscripr or ? For what are you using this filter ? To open parts or do something else ? Hope you understood my point.

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: Catia Macro filtering

(OP)
Hi Ferdo,

I'm working in VB. I'm just trying to filter some of the parts off so it doesn't get shown

Sub CATMain()

Dim doc1 As documents
Dim docName As String
Dim objDocumentPart As PartDocument
Dim i As Integer

Set documents = CATIA.documents

For i = 1 To doc1.Count
docName = TypeName(doc1.Item(i))
If docName = "PartDocument" Then
Set objDocumentPart = doc1.Item(i)
'I want to filter the names of the objDocumentPart.name here to only show certain part docs
Msgbox objDocumentPart.name
Next
End if
End Sub







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