writer icon indicating copy to clipboard operation
writer copied to clipboard

dimStyle.DIMTXSTY It would be better to provide a reasonable default value.

Open FishOrBear opened this issue 2 years ago • 4 comments

dimStyle.DIMTXSTY = "16";//Equal to the default Dimstyle handle. Without it, the annotation style will not be correctly displayed.

what do you think

FishOrBear avatar Apr 12 '23 01:04 FishOrBear

yeah but not sure if it will be convenient for everyone, thus the DIMSTYLE is customizable one can set the values they need.

tarikjabiri avatar Apr 12 '23 12:04 tarikjabiri

This is set to standard style handle by default, not sure what is the problem can you provide an example so I can see the problem

tarikjabiri avatar Apr 18 '23 20:04 tarikjabiri

dxf.zip

image

image

This is the dxf file I generated. The only difference between them is the default style. When no default inherited style is specified, the dimension text disappears.

Because the dxf we write may not provide all dimstyle values, it would be better to give the default inherited style.

FishOrBear avatar Apr 20 '23 09:04 FishOrBear

Using the latest version 2.8.1 you do it like this

// Customize the dimStyleStandard
dxf.document.dimStyleStandard.DIMTXT = 16 // The text height
const dim = dxf.addLinearDim(point3d(), point3d(200, 0), {
  offset: 10,
  styleName: dxf.document.dimStyleStandard.name
});

Also you can use the header variables to customize the look of the dimensions

dxf.setVariable('$DIMTXT', { 40: 10 }); // The text height
dxf.setVariable('$DIMASZ', { 40: 10 }); // Dimensioning arrow size

tarikjabiri avatar Apr 20 '23 11:04 tarikjabiri