Macro dxf

Hello

help, I got a macor to go from 3D to a DXF for cutting which works very well except that the export is done at the same scale as the 2d and not at scale 1.

If I make an ech10 plan I have a DXF ech 10. I call on the macro pro to modify this macro so  that the DXF export is always at scale 1.

Thank you 

May the force be with you.

 


saveas_dxf.swp
1 Like

Hello

It's more complicated than that. If you start from your MEP and change the sheet, the views will overlap and your background will be too small.

Why not open the room and create the press instead?

Edit: See this: http://www.lynkoa.com/forum/solidworks/dxf-pas-la-bonne-echelle

3 Likes

Hello@remrem

In my SW desktop I added macro buttons to go faster and avoid making file saved.....  I don't have any for PDFs, DWG, Step and I'm missing DXF.

When I do a 2D, save it and then I click the buttons this way I do it all very quickly and simply.

 

may the force be with you.

 


macro.jpg
1 Like

Hi OBI WAN,

Your macro if your dwg macro works for what you want to do, you just have to copy it then you rename it to DXF and you edit it and you replace all the dwg with DXF and it should work...

3 Likes

I don't understand your answer. You don't have the scale problem anymore?

2 Likes

Hi there, personally when I was recording shots in dwg or dxf, I regularly had problems, like outlines with a thousand little bits of lines or outlines impossible to close.

Why don't you save your coins in dxf? and at the same time you would have the scale 1 each time!? (yes I know I'm just getting around the problem :) )

 

Kind regards

G.

1 Like

ok  the pdf and dwg macro is to  save 2D plans  .

The DXF  macro attached above flattens a sheet metal and then makes it a DXF.

I give you the DWG pdf macro to test.

PS: The registration of the DWG pdf is done in the same place as the last recording. So for the 2D SW PDF+DWG to be in the same folder, you have to save the plan by making the file Save As, then run the macro.

Then I do my DXF by hand but if the DXF macro would  work the same way it would be great.

May the force be with you.

 


macro_pdf_-dwg.swp

Hello, I'm not in front of my pc but there is an Sw function made on purpose e vba to export the flattening of a part. 

The function to be used is: 

Part.ExportToDWG2() 'Part est un objet PartDoc

Look in the help for settings.

Kind regards.

Hello

Have you tried to change the Soliworks export settings to force it to scale 1?

Kind regards


capture.png
1 Like

To complete the last answer, you have to understand the menu like this:

If "activate" is checked, it applies the setting on the right "sheet scale, model scale, etc... "

 

If "enable" is unchecked, it forces the output in 1:1 scale relative to the MEP document.

(we used this one to always output in 1:1, because we put on the MEPs views outside the sheet on a scale of 1:1, this principle was 100% efficient and reliable)

 

PS: Be careful not to get trapped with the dwg or dxf, to use the "measure" tool,

and not the "dimensioning" tool which can be subject to a scale, depending on the settings of the plan.

 

May the dark side be with you.

Hello Obi wan.

 

Take a look at this tutorial it could be very useful to you.

http://www.lynkoa.com/tutos/3d/macro-d-export-deplie-de-piece-en-dxf

 

Otherwise what is important is to have the "1:1 output scale" option  enabled.

to do this in any drawings have saved-under DXF, the "options... " is displayed in the "Output scale 1:1" part, you check Activate and it's good. 

 

Hello

Yes in the options  my ech is at 1.

For the rest I am looking at it next week because I have my feet in the water and a cocktail in my hand. As such, I take the liberty of  drinking one to your health and to all lynkoenns.

May the force be with you.

 

1 Like

Take advantage of your moment of respite because the resumption will be all the harder but it is with pleasure that you can and still drink one to my health. ^_^

1 Like

Hello

I couldn't find an option to force the DXF plane to scale 1 so I tried to transform this DXF plane to scale 1, it gives, in the case of a transformation of a DRW plane to DXF:

- Save the DRW in DXF.

- Import of this DXF by forcing to scale 1.

- Re-save this DXF plan.

It's not necessarily the cleanest but it seems to work.

Kind regards


saveas_dxf-2.swp
1 Like

In SW, to force a 1:1 scale

you have to uncheck this box in: DXF-DWG option / 1:1 scale / "Activate"

Uncheck this box!

this way the generation will always be forced in 1:1 (compared to the MEP).

 

This is why we put the 1:1 scale views in the plane (without dimensions), outside the sheet.

So the DXF output will always be 1:1, without any problems with different view scale.

Hello

Sorry for the delay but I just got back from vacation and now I'm 200 emails late.

To be clear, the dxf export is for a 3d sheet flattened for plasma cutting. Have you tested my macro ? If you have an open 3D sheet and you run this macro you have the press for cutting. The problem is that you have the dxf at the scale of the plane and not scale 1. What I want is a macro that the development of a scale 1 sheet metal makes.

I'm going to be armored for part of the week but I'll come back to lynkoa quickly promised.

Thank you again.

May the force be with you.

1 Like