Browse Source

fixed CSV export

master
Youen 10 months ago
parent
commit
46698319f6
  1. 2
      ahb_cmd_export_parts_list.py

2
ahb_cmd_export_parts_list.py

@ -99,7 +99,7 @@ class AHB_ExportPartsList:
mass_str = str(int(part.mass + 0.5)) mass_str = str(int(part.mass + 0.5))
elif part.mass >= 0: elif part.mass >= 0:
mass_str = str(int(part.mass*10 + 0.5) / 10.0) mass_str = str(int(part.mass*10 + 0.5) / 10.0)
f.write(part.document + ", " + part.reference + "," + part.material + "," + str(int(part.size[0]+0.5)) + "," + str(int(part.size[1]+0.5)) + "," + str(int(part.size[2]+0.5)) + "," + str(int(part.volume/100+0.5)/10.0) + "," + mass_str + ", " + str(part.count) + "\n") f.write(part.document + "," + part.reference + "," + part.material + "," + str(int(part.size[0]+0.5)) + "," + str(int(part.size[1]+0.5)) + "," + str(int(part.size[2]+0.5)) + "," + str(int(part.volume/100+0.5)/10.0) + "," + mass_str + ", " + str(part.count) + "\n")
print("Part list exported to " + file_name) print("Part list exported to " + file_name)
from ahb_command import AHB_CommandWrapper from ahb_command import AHB_CommandWrapper

Loading…
Cancel
Save