MuhammadSajid commited on
Commit
c98dd53
·
verified ·
1 Parent(s): 439f1ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -78,8 +78,9 @@ def create_dxf_capacitor_bank(capacitors):
78
  for idx, cap in enumerate(capacitors):
79
  label = f"{cap} kVAR"
80
  msp.add_lwpolyline([(x, 0), (x+10, 0), (x+10, 10), (x, 10), (x, 0)])
81
- # Set the text insertion point
82
- msp.add_text(label, dxfattribs={'height': 2.5}).set_pos(insert=(x, 12))
 
83
  x += 15
84
  output_path = "capacitor_bank.dxf" # Changed to relative path
85
  doc.saveas(output_path)
 
78
  for idx, cap in enumerate(capacitors):
79
  label = f"{cap} kVAR"
80
  msp.add_lwpolyline([(x, 0), (x+10, 0), (x+10, 10), (x, 10), (x, 0)])
81
+ # Create text entity and set its properties
82
+ text = msp.add_text(label, dxfattribs={'height': 2.5})
83
+ text.dxf.insert = (x, 12) # Set the insertion point
84
  x += 15
85
  output_path = "capacitor_bank.dxf" # Changed to relative path
86
  doc.saveas(output_path)