This is something I thought would be extremely easy, yet I'm getting no where.
I've tried PartProgram.Import("C:\file\location.csv") as well as PartProgram.Import2("C:\file\location.csv", true)
PartProgram.Import("C:\file\location.step") works as it should for importing CAD.
What am I missing? I've going through the object library and there is no mention of importing a csv but the Import() and Import2() do mention importing another format into the measurement routine.
I just had one of the developers check and the Import / Import2 methods do not support .csv. I think that's because the csv import tool was probably added at some point after those automation methods were created and whichever developer added .csv neglected to add automation support. We could maybe consider adding it in a future version (2024.1 would be the earliest possible). Until then, you would have to add scripting to parse the csv file yourself and use the other available automation tools to populate the routine.
I've never tried this but maybe the script could send/post a command message (273, 1061) to perform what the File/Import does.
273 = WM_COMMAND
1016 = ID_FILE_IMPORT_CSV
Not sure how well pcmdis will do with this as I think part of the process also saves the current PRG which is running the script.
SABarber, any idea how I can get a handle on the window? I'll need that for Call SendMessage. I assume I can use FindWindow if I knew the class name and caption?
edit: just saw your last response. I'll just write a parser for the csv file. should be easy enough.