makyy
Automotive
- Mar 2, 2021
- 19
Hello everyone,
I created a userform in which when i select a command button then select the view , the view name appears in the text box. However, I want to be able to do multiple view selection and am unable to do so.
the view here is (front view, left view, bottom view, the one in drafting)
ref image
Also, i want to remove selected view from the textbox from another command button.
with this code I can make only one view slection:
Private Sub ViewSelect_Click()
Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument
Dim InputObject(0)
InputObject(0) = "DrawingView"
Dim DrwSelect As Object
Set DrwSelect = CATIA.ActiveDocument.Selection
Dim Status
Status = DrwSelect.SelectElement2(InputObject, "Select View", False)
Dim drwView
Set drwView = DrwSelect.Item(1).Value
TextBox1.Text = (drwView.Name) 'To get the view in the Textbox1
End Sub
Any help will be appreciated . I literally dont know any coding thats why i have to rely on eng-tips . But will try my best to learn it. Thankyou all in advance.
I created a userform in which when i select a command button then select the view , the view name appears in the text box. However, I want to be able to do multiple view selection and am unable to do so.
the view here is (front view, left view, bottom view, the one in drafting)
ref image
Also, i want to remove selected view from the textbox from another command button.
with this code I can make only one view slection:
Private Sub ViewSelect_Click()
Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument
Dim InputObject(0)
InputObject(0) = "DrawingView"
Dim DrwSelect As Object
Set DrwSelect = CATIA.ActiveDocument.Selection
Dim Status
Status = DrwSelect.SelectElement2(InputObject, "Select View", False)
Dim drwView
Set drwView = DrwSelect.Item(1).Value
TextBox1.Text = (drwView.Name) 'To get the view in the Textbox1
End Sub
Any help will be appreciated . I literally dont know any coding thats why i have to rely on eng-tips . But will try my best to learn it. Thankyou all in advance.