Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple view Selection

Status
Not open for further replies.

makyy

Automotive
Mar 2, 2021
19
0
0
JP
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
img4_exk4l0.png


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.
 
Replies continue below

Recommended for you

SelectElement2 is for one object, try using SelectElement3.
Having said that, pls. try to research the web some more before relying on eng-tips...
[ul]
[li]you MUST look into the CATIA's own chm file: "C:\Program Files\Dassault Systemes\B28\win_b64\code\bin\V5Automation.chm"[/li]
[li]you should google your questions. "vbscript multiselect catia" is what I'd use[/li]
[/ul]


regards,
LWolf
 
Status
Not open for further replies.
Back
Top