×
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 make Catia active during running a macro

How to make Catia active during running a macro

How to make Catia active during running a macro

(OP)
Hello,

I can not figure it out how to make Catia active during macro is running.

I mean when I run a macro and everything is done and Msgbox is displayed, I would like to scroll the expand tree or zoom in/zoom out/rotate the model.

I just want to be Part design active during macro is running. How to do that?


Thank you in advance for any suggestions,

RE: How to make Catia active during running a macro

Can u give more info, what are u doing with macro, etc

RE: How to make Catia active during running a macro

(OP)
Hello,

I appreciate if you could help me with this, when msgbox appears i would like to be able to click on tree and rotate the model..please see below
thanks in advance

Sub CATMain()

Dim partdocument1
Set partdocument1 = CATIA.ActiveDocument
Set part1 = partdocument1.Part

Set selection1 = partdocument1.Selection
'selection1.Search "CATPrtSearch.PartDesign Feature.Activity=FALSE"
selection1.Search "((((((CATStFreeStyleSearch.Point + CAT2DLSearch.2DPoint) + CATSketchSearch.2DPoint) + CATDrwSearch.2DPoint) + CATPrtSearch.Point) + CATGmoSearch.Point) + CATSpdSearch.Point),all"


'************************ here I want to be a Part design active! I want to roate the model, clicking on tree...
MsgBox("The number of points is: " & selection1.Count )

End Sub

RE: How to make Catia active during running a macro

U want to make a macro who will count points in part or? And if u want to make a selecetion u must do it like this

Dim InputObject(0)
Dim oStatus
oStatus = oSel.SelectElement2(InputObject, "Select the Sketch, points etc", True)

with this u can select one element, if u want more u must use multiselection

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