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!

Need help in searching and selection of part

Status
Not open for further replies.

Aviatorbarath

New member
Dec 27, 2012
35
US

I have a hybrid shape "INtersect in a know geometric set. I would like to do the selection automatically which is in the Geometric set named " geometric_Set_Disassemble rather specifying the name of the intersect

Any suggestions. My actual code is given below

Dim hybridbody8
Set hybridbody8 = hybridBodies1.Item(" Geometric_Set_Disassemble")
Set hybridShapes1 = hybridbody8.HybridShapes
Set selection1 = partDocument1.Selection

Set Disassemble = hybridShapes1.Item[highlight #FCE94F]("Intersect.2")[/highlight]
CATIA.ActiveDocument.Selection.Add (Disassemble)


Dim hybridbody9
Set hybridbody9 = hybridBodies1.Add()
hybridbody9.Name = " Disassembled_Lines"
'sets the newly created geometrical set as the in work object
Set hybridbody9 = hybridBodies1.Item(" Disassembled_Lines")

CATIA.StartCommand ("Disassemble")
' WshShell.AppActivate ("Disassemble")
'Call WshShell.SendKeys("%{TAB}", True)
CATIA.RefreshDisplay = True
SendKeys "{ENTER}", True
 
Replies continue below

Recommended for you

I suppose is vba because in CATScript send keys is not working (as far as I know). Is working thru a vbs file (calling the vbs in CATScript).

By the way, when use send keys is good to set also a delay to let time command to be executed.

You can use also "user selection" to get the element you need and work with references.

If you want to use search function to select something I can recommend you this link to understand better how is working.



Regards
Fernando

 
Hi ferdo

yea You are right. Send keys dont work in CATScript thats y opted VBA and as per suggestion added delay code bfore send key execution.

And thanks for that useful link, it was more than useful

Thanks and regards
Barath
 
Hi ferdo

I found the syntax for selecting the object named Intersect. but bfore that how do i select the geometric set. I need the intersect object only from the specified geometric set..

Any suggestion

Regards
barath
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top