×
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

Parameters scan

Parameters scan

Parameters scan

(OP)
Hi everyone,

So I create this :

If oBodies.Count > 0 Then
Dim m As Integer
For m = 1 To oBodies.Count
If oBodies.Item(m).Name = sHybridBodyName Then
MsgBox "It appears the geometrical set that this macro creates already exists in the part. Unable to proceed.", vbCritical, "Error"
Exit Sub
End If
Next
End If


And I would like to know if I can apply it for parameters.. More precisiely, like this :


If oPart.Parameters.Count > 0 Then
Dim n As Integer
For n = 1 To oPart.Parameters.Count
If oPart.Parameters.Item(n).Name = "`Extraction point`" Then
MsgBox "It appears the extraction point parameters that this macro creates already exists in the part. Unable to proceed.", vbCritical, "Error"
Exit Sub
End If
Next
End If


For the moment it doesn't work. My macro proceed but nothing happen when it comes to check if the parameters exists. Any advice would be great.

Thanks to all,
Pharys

PS: I am learning VBA scripting with CATIA since one week, sorry if my questions seems obvious :)

RE: Parameters scan

(OP)
I found the problem !!! It's because there is a space in my parameter name... As I cannot change it, is it possible to "force" the scan ?

Thanks again,
Pharys

RE: Parameters scan

(OP)
I was wrong !!! It wasn't because of the space ....

The things I had to do was to go deeper in the tree and now it works !

If anyone need help on it, please contact me :)

Byee

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