dxf export

dxf export

Anonymous
Not applicable
335 Views
3 Replies
Message 1 of 4

dxf export

Anonymous
Not applicable
I need some help exporting to a dxf using VBA. My current solution exports
the entire drawing (all tabs: modelspace and paperspace) using the code:

Set sSet = Application.ActiveDocument.SelectionSets.Add("NEWSS")
sSet.Select acSelectionSetAll
ThisDrawing.Export strDxfName, "dxf", sSet

What I need is the ability to select a specific tab and export only that tab
to the modelspace of a new dxf. For example, I have a dwg with three tabs:
one model and two paperspaces. I need to take one of the paperspaces (the
whole thing) and create a dxf from it using only the modelspace within the
dxf.

Thanks in advance for any help!!

Bruce
0 Likes
336 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I think that VBA will not assume to you
the filter with use of the code of 410 groups.
Work will come back only empty selection set.
Instead of it probably to use a simple loop of search
of objects in a cycle with exception unnecessary objects
corresponding to object name the property

Something like this:
Dim sset as acadSelectionset
Dim oEnt(0) as acadEntity
Dim oLayout is acdlayout
Set sSet = Application.ActiveDocument.SelectionSets.Add("NEWSS")

Set olayout = Thisdrawing.Layouts("LayoutName")
For each oent(0) in olayout.Block
sset.Additems oent
Next

etc.

Sorry it's written w/o editor may it will have a some mistakes

Hth

~'J'~
0 Likes
Message 3 of 4

Anonymous
Not applicable
Oops, sorry, my bad
See Help:

For EPS and DXF formats, the selection set is
ignored and the entire drawing is exported.
I think in this case you want to WBLOCK all tabs
separatelly and then convert all to DXF format

~'J'~
0 Likes
Message 4 of 4

Anonymous
Not applicable
That's why I would recommend looping trought your PaperSpace (or the block you want to export) and make a copy of these objects to a new dranwing, that you will then completly export to DXF.

I think this is your only option....
0 Likes