hello
i would like to select objects like points or curves by clicking during a macro execution. the only way i can select them now is writing the object´s name on an input box.
does anybody know if it's possible and how?
thanks.
There may be some useful information in the following thread:
thread559-54133 the 4th post n this thread, Regg discusses the "ShowModal" property of VB forms. Perhaps this applies to your situation.
Good and evil: wrap them up and disguise it as people.
Hi Sandia
I suppose I may have an answer for you but the thing is that you need to click on the object before running your macro.
You should try:
set sel=CATIA.ActiveDocument.Selection
set obj=sel.FindObject(MyType)
MyType should be replaced by a type of object you can find in the objects explorator in VB .
Here's an example to select a point2D
Dim xPt1
Dim xSel
Dim nom as String
Dim Coord1(1) as Variant
set xSel=CATIA.ActiveDocument.Selection
set xPt1=xSel.FindObject("CATIAPoint2D"
'get its name:
nom=xPt1.Name
'get his coordonates:
xPt1.Getcoordonates Coord1
'see them
msgbox Coord1(0)
msgbox Coord1(1)
Don't forget to select a Point2D in a drawing before running the macro.