PSLTSCALE and PaperSpaceAnnotationScalingEnabled

1
Neil Lee
10/13/2021 1:47 PM

I am trying to create a file with PSLTSCALE set to 0, but I end up with a file written with PSLTSCALE set to 1.

If I do this:

WW.Cad.IO.DwgWriter.Write("test.dwg",new DxfModel(WW.Cad.IO.DwgReader.Read("template.dwg")))

If the template file has PSLTSCALE set to 0 then the output file also does.

However, once I've created lots of geometry setting any combinations of PaperSpaceAnnotationScalingEnabled and PaperSpaceLineTypeScaling still seems to end up with a file with PSLTSCALE set to 1 after a WW.Cad.IO.DwgWriter.Write.

Is there something like adding layouts that changes this, or something else I need to do ?

Thanks

Wout
10/13/2021 2:48 PM

Hi,

As the forum text states we need code + input data to reproduce problems.

- Wout

Neil Lee
10/14/2021 5:54 AM

I spent a lot of time trying to put something together and found that my problem was different to what I'd thought.

When I generate a DWG and load it into AutoCAD, PSLTSCALE is set to 0, but AutoCAD seems to change it to 1 every time I switch tab (hence my confusion).

My actual issue is that when I've finished generating my file, I have to click on each layout tab in AutoCAD and type PSLTSCALE 0 then REGENALL to get all my dashed lines to look as I want them (the same as in model space).

Is there something I can do in code when creating the entities and/or viewports etc., that will make the file generate as though it had been done in AutoCAD with PSLTSCALE 0 ?

Wout
10/14/2021 9:21 AM

The property you're looking for is DxfLayout.PaperSpaceLinetypeScalingEnabled, since it has to be a per layout setting.

- Wout

Neil Lee
10/14/2021 9:31 AM

Thanks - sorry to be a pain, but I can't find this.

Is it relatively new ? I'm running 4.0.37.163.

Wout
10/14/2021 9:43 AM

In older versions you can set property DxfLayout.Options, but you'll have to set the LayoutOptions.PaperSpaceLinetypeScaling accordingly, functionally it's the same.

- Wout

Neil Lee
10/14/2021 10:02 AM

Works perfectly.

Thank-you

1