EZDXF - Creating custom styles

65 views Asked by At

I'm creating a drawing with more than hundred dimensions and having a couple problems with dimstyles.

I can see styles like 'EZ_M_100_H25_CM', 'EZ_M_1_H25_CM' in AutoCAD's dimension styles section. So I want to create couple styles that I can choose in AutoCAD and also want to use them like dim = msp.add_linear_dim(base=(3, 2), p1=x1, p2=x2, dimstyle="my_style_1") if it's possible.

When I tried to my_dim_style_1 = doc.dimstyles.new(name="my_style_1", dxfattribs = {"dimtxt": 20,"dimclrt": 3}) my texts disappears.

my_dim_style_1.set_arrows(blk=ezdxf.ARROWS.closed_filled) works but i can't give a scale to it.

There are methods like '.set_extline_format()' but there are also attributes like 'dimgap, dimtad' and I'm not sure how can I define them.

  • How can I create global custom styles and change their attributes?
  • Can I copy 'EZDXF' one change some of its attributes and save with a different name?
0

There are 0 answers