×
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 Automation (VBA, VB.net), Sketch Constraint "FIX TOGETHER"

CATIA Automation (VBA, VB.net), Sketch Constraint "FIX TOGETHER"

CATIA Automation (VBA, VB.net), Sketch Constraint "FIX TOGETHER"

(OP)
Hello,

I have a contour in a CATIA sketch which I would like to move around and rotate. My plan is to fix the geometric elements together to be able to do so without changing the shape of the contour.

Is it possible to create this kind of constraint?
I haven't found anything in AutomationV5.chm and Macro Recording doesn't help neither.

Please help.


Thank you

RE: CATIA Automation (VBA, VB.net), Sketch Constraint "FIX TOGETHER"

Hi

You need to modify according to your needs.

CODE --> CATScript

Language="VBSCRIPT"

Sub CATMain()

Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = partDocument1.Selection

selection1.Search "CATSketchSearch.2DGeometry,all"

CATIA.StartCommand "Fix Together"

End Sub 

Regards
Fernando

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

RE: CATIA Automation (VBA, VB.net), Sketch Constraint "FIX TOGETHER"

(OP)
Thank you!

That's a good start I guess but how do i hit the ok button afterwards automatically? The selected items just get referenced in the fix-together command field but it doesn't actually execute the command unless the user hits ok???

Thank you again for your help

RE: CATIA Automation (VBA, VB.net), Sketch Constraint "FIX TOGETHER"

(OP)
AppActivate("CATIA")
SendKeys.Send("{ENTER}")

like this or do you have a better idea? thanks

RE: CATIA Automation (VBA, VB.net), Sketch Constraint "FIX TOGETHER"

(OP)
And another question, is there a method to rotate geometric elements?
Sometimes I have the Problem that my contour is 90° rotated, which is wrong. Now I have to rotate it.

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