Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make Catia active during running a macro

Status
Not open for further replies.

Macro2015

Automotive
Jan 19, 2015
10
SI
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,
 
Replies continue below

Recommended for you

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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top