PipeCAD icon indicating copy to clipboard operation
PipeCAD copied to clipboard

Output of BOM of iso

Open rompik opened this issue 2 years ago • 1 comments

Hello Shing, Please can you add functionality to output BOM of iso by separate command, for example:

self.isoGraphicsView = QIsoGraphicsView(self)
self.isoGraphicsView.SetOptionFile(aOptionFile)
mto = self.isoGraphicsView.Output.Materials()

Output of BOM can be done in dictionary format: Example of BOM on iso: image

Example of code:

mto = {
  1 : {                                                                                    
    "group" : "ERECTION MATERIALS",
    "subgroup
" : "PIPE",
    "description" : "PIPE SCH80 ANSI B36.10",
    "item code" : "PA100",
    "size" : 100mm,
    "quantity" : 100mm,
  }
  2 : {
    "group" : "ERECTION MATERIALS",                                                                   
    "subgroup" : "FITTINGS",
    "description" : "ELBOW LR ANSI B16.9 BW",
    "size" : 100mm,
    "item code" : "AAEA200-",
    "quantity" : 2,
  }
  3 : {   
    "group" : "ERECTION MATERIALS",                                                                                       
    "subgroup" : "FLANGES",
    "description" : "FLANGE DN200 WN ANSI B16.5 #300. R",
    "size" : 100mm,
    "item code" : "AFWBD0-",
    "quantity" : 2,
  }
  4 : {         
    "group" : "ERECTION MATERIALS",                                                                                 
    "subgroup" : "GASKETS",
    "description" : "GASKET RF 1.5MM ANSI B16.5 #300",
    "size" : 100mm,
    "item code" : "ACGCBDG-",
    "quantity" : 2,
  }
}

where: fixed column - group - ERECTION/FABRICATION MATERIALS fixed column - subgroup - PIPE/FLANGES/FITTINGS/MISCELLANEOUS COMPONENTS/BOLTS/VALVES/INSTRUMENTS/SUPPORTS column from option file - description - TEXT FROM DETREF + TEXT FROM MATREF column from option file - size - in MM/INCH column from option file - item code column from option file - quantity - in units or in MM/INCH

rompik avatar Nov 10 '22 11:11 rompik

Hello, Roman,

In Isodraft there is an option to control material list to file: Material List File

I will add this option and output the material list file to dictionary format(json format).

eryar avatar Nov 10 '22 23:11 eryar