Solved

Generic Writer Autodesk AutoCAD DWG/DXF

  • 27 March 2017
  • 3 replies
  • 9 views

Badge +9

Probably a simple solution to this but I can't seem to find it.

If I have a generic writer and I want to write out to dwg or dxf how do I enforce it to write to dxf, it defaults to dwg . I have tried lots of things like creating a dummy writer for ACAD or creating an output published parameter with 2 options for the AutoCAD writer with 2 different values-- this works but if I select DWG or DXF I still get a dwg file.

I can add a tester which sorts whether the end user selected DWG or DXF and then filters it into an ACAD writer that has the extension hardcoded..but I don't really want to do that when I feel like I have just missed something? Any help would be appreciated

icon

Best answer by daveatsafe 29 March 2017, 02:05

View original

3 replies

Userlevel 2
Badge +17

Hi @ciarab,

Using dummy writers for particular formats is recommended way to control the Generic writer parameters.

You can use a dummy writer for ACAD to control the output file type. The generic writer will use the extension of the output file of the dummy writer to set its extension.

I am attaching an example that has a published parameter to choose between DWG and DXF. The output file name of the dummy writer uses this parameter for its extension. The Generic writer in turn takes the extension chosen from the dummy writer.

Badge +9

Thanks @DaveAtSafe ,I did try this as my first option but I found it worked the first time I ran but after that it didn't update the extension again it stored the first option I chose. But ill give your example a test and let you know how I get on hopefully it does the trick.

Badge +9

Hi @ciarab,

Using dummy writers for particular formats is recommended way to control the Generic writer parameters.

You can use a dummy writer for ACAD to control the output file type. The generic writer will use the extension of the output file of the dummy writer to set its extension.

I am attaching an example that has a published parameter to choose between DWG and DXF. The output file name of the dummy writer uses this parameter for its extension. The Generic writer in turn takes the extension chosen from the dummy writer.

 

Thanks @DaveAtSafe got a chance to test this out and works perfectly, don't know why it didn't work for me when I tried, I think I might of put the extension parameter on the generic writer rather than the dummy.

 

 

Reply