Marthee commited on
Commit
1e8058a
·
verified ·
1 Parent(s): 2e2ae29

Update dxf__omar3_2.py

Browse files
Files changed (1) hide show
  1. dxf__omar3_2.py +5 -5
dxf__omar3_2.py CHANGED
@@ -449,7 +449,7 @@ def save_multiple_annotations_bax(annotations, output_path, column_order,pdfWidt
449
  f.write(pretty_xml)
450
 
451
  print(f" Saved {len(annotations)} annotations to {output_path}")
452
-
453
  """PDF to image"""
454
 
455
  def pdftoimg(datadoc,pdf_content=0):
@@ -2475,7 +2475,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
2475
  # save_multiple_annotations_bax(
2476
  # bax_annotations, 'Area_Perimeter_OMAR_output.bax', column_order, pdfWidth, pdfHeight
2477
  # )
2478
- save_multiple_annotations_bax(
2479
  annotations, 'FF-Ceiling.bax', column_order, pdfWidth, pdfHeight
2480
  )
2481
 
@@ -2498,8 +2498,8 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
2498
 
2499
  column_xml = generate_bluebeam_columns_raw(column_order)
2500
 
2501
- with open("3.2_custom_columns.xml", "w", encoding="utf-8") as f:
2502
- f.write(column_xml)
2503
 
2504
  page2.set_rotation(rotationOld)
2505
  Correct_img=flip(imgg)
@@ -2573,7 +2573,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
2573
  x,y,z=int(annot_color.get(v)[0]*255),int(annot_color.get(v)[1]*255),int(annot_color.get(v)[2]*255)
2574
  list1.loc[len(list1)] =[annot.info['content'],annot.info['id'],annot.info['subject'],[x,y,z]]
2575
  print('LISTTT',list1)
2576
- return doc2,image_new1, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1,hatched_areas
2577
 
2578
  # doc.save('Testing(2.7).pdf')
2579
  # return doc,image_new1#, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1,hatched_areas
 
449
  f.write(pretty_xml)
450
 
451
  print(f" Saved {len(annotations)} annotations to {output_path}")
452
+ return pretty_xml
453
  """PDF to image"""
454
 
455
  def pdftoimg(datadoc,pdf_content=0):
 
2475
  # save_multiple_annotations_bax(
2476
  # bax_annotations, 'Area_Perimeter_OMAR_output.bax', column_order, pdfWidth, pdfHeight
2477
  # )
2478
+ pretty_xml=save_multiple_annotations_bax(
2479
  annotations, 'FF-Ceiling.bax', column_order, pdfWidth, pdfHeight
2480
  )
2481
 
 
2498
 
2499
  column_xml = generate_bluebeam_columns_raw(column_order)
2500
 
2501
+ # with open("3.2_custom_columns.xml", "w", encoding="utf-8") as f:
2502
+ # f.write(column_xml)
2503
 
2504
  page2.set_rotation(rotationOld)
2505
  Correct_img=flip(imgg)
 
2573
  x,y,z=int(annot_color.get(v)[0]*255),int(annot_color.get(v)[1]*255),int(annot_color.get(v)[2]*255)
2574
  list1.loc[len(list1)] =[annot.info['content'],annot.info['id'],annot.info['subject'],[x,y,z]]
2575
  print('LISTTT',list1)
2576
+ return doc2,image_new1, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1,hatched_areas, pretty_xml, column_xml
2577
 
2578
  # doc.save('Testing(2.7).pdf')
2579
  # return doc,image_new1#, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1,hatched_areas