Type Mismatch when creating a selectionset

Type Mismatch when creating a selectionset

Anonymous
Not applicable
269 Views
3 Replies
Message 1 of 4

Type Mismatch when creating a selectionset

Anonymous
Not applicable
I am trying to create an empty selection set to use when exporting a dxf file. on the Set junk = line, I get the following error:

Run Time Error'13':
Type Mismatch

Here is the code.

Dim junk As AcadSelectionSet
Set junk = ThisDrawing.SelectionSets.Add("empty_set")

ThisDrawing.Export name_no_ext, "dxf", DXF
0 Likes
270 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
If you want to export to DXF file, you don´t need to especify the selection
set. When we export to DXF file, the selection set is ignored and the entire
drawing is

exported. In your case, you're providing a wrong selecion set.


    Dim junk As
AcadSelectionSet 
    Set junk =
ThisDrawing.SelectionSets.Add("empty_set")

    ThisDrawing.Export name_no_ext, "dxf",
junk
color=#000000>   
'here you
have to put the selection set created above


You have to verify if there is another selection set named "empty_set",
before you create one, because if there is a selection set with the same name,
it will cause a conflict.

      
face="Courier New">For i_count = 0 To ThisDrawing.SelectionSets.Count -
1
       If
ThisDrawing.SelectionSets.Item(0).Name = "empty_set" then


face="Courier New">        ThisDrawing.SelectionSets.Item(0).Delete

       End
If
    Next i_count

 

 

Yuri

 

 

 

I
am trying to create an empty selection set to use when exporting a dxf file. on
the Set junk = line, I get the following error:

Run Time Error'13':
Type Mismatch

Here is the code.

Dim junk As AcadSelectionSet
    Set junk =
ThisDrawing.SelectionSets.Add("empty_set")

ThisDrawing.Export name_no_ext, "dxf", DXF

0 Likes
Message 3 of 4

Anonymous
Not applicable
Well, one thing that I see is

 

    ThisDrawing.Export name_no_ext,
"dxf", DXF <---- should be junk

 

Second, what is the value in name_no_ext, it should
be a string

representing the filename.

 

Joe

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
am trying to create an empty selection set to use when exporting a dxf file.
on the Set junk = line, I get the following error:

Run Time Error'13':
Type Mismatch

Here is the code.

Dim junk As AcadSelectionSet
    Set junk =
ThisDrawing.SelectionSets.Add("empty_set")

ThisDrawing.Export name_no_ext, "dxf", DXF

0 Likes
Message 4 of 4

Anonymous
Not applicable
Yuri, Joe,

Thanks for the help!
0 Likes