Page 1 of 1
Select element
Posted: Tue Dec 13, 2011 1:34 pm
by Maciekkk
Hi,
How I can select element in TopSolid from API ? I can't find any functions, with this method.
Regards
Maciekkk
Posted: Mon Jul 14, 2014 12:45 pm
by Holzknoten
you have to use IAsks.AskElement(Element)
See Helpfile API for Information.
i can bring you a code-sample in the next Days.
Posted: Mon Jul 14, 2014 3:43 pm
by topzoli
Here
Dim TopApp As TopSolid.Application
Dim TopDoc3D As TopSolid.Document
Dim ker As TopSolid.TopAskAnswer
Dim jelolo As String
Dim val As TopSolid.Element
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TopApp = New TopSolid.Application
TopDoc3D = TopApp.CurrentDocument
TopApp.Asks.Question = "Witch shape do you choose"
ker = TopApp.Asks.AskElement(Val)
If ker = TopSolid.TopAskAnswer.topAskAnswerOK Then
jelolo = Val.NameOrIdentifier
MessageBox.Show("You choose " & jelolo & " this shape
")
Else
End If
End Sub