Danke schön für Ihre Antworte !
Diese Lösung ist OK für eine konstant InputObjectType. Ich brauche verschiedene InputOjectType zu benutzen, e.g. "Points" oder "Points or Lines", etc. Was steht in meine makro ist :
...
Set mySel = CATIA.ActiveDocument.Selection
if isPoint and isLine and isCurve then
redim InputObjectType(2) as variant
InputObjectType(0)="Point"
InputObjectType(1)="Line"
InputObjectType(2)="HybridShapeSpline"
elseif isPoint and isLine then
redim InputObjectType(1) as variant
InputObjectType(0)="Point"
InputObjectType(1)="Line"
elseif isPoint and isCurve then
redim InputObjectType(1) as variant
InputObjectType(0)="Point"
InputObjectType(1)="HybridShapeSpline"
elseif isPoint then
redim InputObjectType(0) as variant
InputObjectType(0)="Point"
end if
myMsg = "Sel " & Join(InputObjectType, " or ") & " (Ctrl+Z or Undo to quit)"
Status = mySel.selectElement2(InputObjectType,myMsg,false)
If Status = "Normal" and mySel.count=1 Then
Set myEnt = mySel.Item(1).Value
...
Ausserdem steht das in eine Schleife : Mit "dim InputObjectType(2)" zu beginnen gibt es ein "Type Mismatch" code am erste Shleife...
Nach anderen Testen : es scheint, dass nur "InputObjectType(0)" (i.e. "Points") verstanden ist. Volgenden linien wurden ignorieren...
(Pfff... Nicht so einfach, dieses Problem aus Deutsch zu erklären !!)
Danke noch !
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP