schau dir das mal an
ist das das was du brauchst?
###################################
Sub CATMain()
Dim montab(0)
montab(0)="Product"
Dim document
set document = CATIA.ActiveDocument
Dim selection
set selection = document.Selection
Dim TheSPAWorkbench
Dim TheMeasurable
Dim referenceObject
do
call selection.clear()
Dim str
str=selection.SelectElement(montab,"Please select an object",true)
if str = "Normal" then
Dim count
count = selection.Count
Dim Reference
Dim selectedElement
Dim objet
Dim i
for i=1 to count
set selectedElement = selection.Item(i)
dim prod as Product
set prod = selection.item(i).value
set referenceObject = selectedElement.Reference
msgbox referenceObject.Displayname
next
else
msgbox str
end if
Dim yesOrNo
yesOrNo = msgbox("Would you like to continue selecting object?",4,"Selection Option")
If (yesOrNo = 7) then
str = "Cancel"
End If
selection.clear
Loop While str = "Normal"
End Sub
##############################
------------------
gruss
scheuche
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP