hexagon logo

PCDMIS to CSV File

There are a ton of threads regarding PCDMIS to a CSV/Excel file. Most of them are for older versions of PCDMIS.

We are trying to get this to work with 2019 r1. Our goal is to get our PCDMIS data into a single CSV file for all of our part types for each run.


The PCDMIS to Excel option is VERY clunky and not real great for multiple parts of the same part type.


Anybody have a solution we could try??

Thanks
Parents
  • now for this scrip to work the way you are going to want you have to use a excel template that your features go left to right and the measurements are all in one row

    Sub simpleXlsMerger()
    Dim bookList As Workbook
    Dim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As Object
    Application.ScreenUpdating = False
    Set mergeObj = CreateObject("Scripting.FileSystemObject")

    'change folder path of excel files here
    Set dirObj = mergeObj.Getfolder("C:\Users\qc2\Desktop\test")
    Set filesObj = dirObj.Files
    For Each everyObj In filesObj
    Set bookList = Workbooks.Open(everyObj)

    'change "A2" with cell reference of start point for every files here
    'for example "B3:IV" to merge all files start from columns B and rows 3
    'If you're files using more than IV column, change it to the latest column
    'Also change "A" column on "A65536" to the same column as start point
    Range("A5:IV" & Range("A65536").End(xlUp).Row).Copy
    ThisWorkbook.Worksheets(1).Activate

    'Do not change the following column. It's not the same column as above
    Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
    Application.CutCopyMode = False
    bookList.Close
    Next
    End Sub


    so open up excel go to developer tab and click vb and then double click on the workbook at the left side and a window will pop up past the the scripted in , now i did not make this scrip its something i found online not sure where i found it though
Reply
  • now for this scrip to work the way you are going to want you have to use a excel template that your features go left to right and the measurements are all in one row

    Sub simpleXlsMerger()
    Dim bookList As Workbook
    Dim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As Object
    Application.ScreenUpdating = False
    Set mergeObj = CreateObject("Scripting.FileSystemObject")

    'change folder path of excel files here
    Set dirObj = mergeObj.Getfolder("C:\Users\qc2\Desktop\test")
    Set filesObj = dirObj.Files
    For Each everyObj In filesObj
    Set bookList = Workbooks.Open(everyObj)

    'change "A2" with cell reference of start point for every files here
    'for example "B3:IV" to merge all files start from columns B and rows 3
    'If you're files using more than IV column, change it to the latest column
    'Also change "A" column on "A65536" to the same column as start point
    Range("A5:IV" & Range("A65536").End(xlUp).Row).Copy
    ThisWorkbook.Worksheets(1).Activate

    'Do not change the following column. It's not the same column as above
    Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
    Application.CutCopyMode = False
    bookList.Close
    Next
    End Sub


    so open up excel go to developer tab and click vb and then double click on the workbook at the left side and a window will pop up past the the scripted in , now i did not make this scrip its something i found online not sure where i found it though
Children
No Data