Jump to content

Exporting data


---
 Share

Recommended Posts

I have a program that outputs the data to the Calypso characteristic spreadsheet. We then convert some of that data through a merge file spreadsheet to sent to the customer. This is very labor intensive and tedious. How do I (can I) output specific data on a separate spreadsheet for the customer?

Thanks in advance.
Link to comment
Share on other sites

In a previous life, we created an excel output template for each measurement plan. Let the Report tab populate from Calypso, then add additional tabs, and manipulate the data as needed. We set up a sheet for capability studies, a sheet formatted like our standard report, and a sheet formatted for our customer. When everything is complete, remove the cell data from the Report tab, and save. Direct your plan to the correct template.

After this is set up, we used VBA within the template to open another excel workbook that correlated the capability data, and a second that correlated the customer data. This action was performed automatically, when the Calypso output saved.

It was a bit of work up front, but saved time in the long run.

Good Luck
Link to comment
Share on other sites

How good are you with PCM?
I have a very labor intensive way do export data to our WinSPC program.
The reason for the labor intensity is that we have Calypso and PC-Dmis exporting data for the same part numbers sometimes, and the exported data must match exactly right down to blank spaces between lines and the syntax of the "Dim #4 Profile".
So there's no using any package suites for me.
But once you get 1 program up and running, it becomes much easier to replicate the reports into other programs.

Let me know

XXXX-T-XXXX ORDER-0000 SCAN# 25 .txt

Link to comment
Share on other sites

No, that attachment is the resulting file that is generated, all dims lined up and reported.
The code is much longer, i've attached the code for the program that generated this report.
Its in the post settings.

If you wish to zip a file and send it to me i can spend a little time and make something for you, and then you can pick it apart and make it like you want.
Just tell me what dims you want reported.
To be honest i'm not much of a "Code Writer", but i've done this 1 thing so many times it doesn't take me much time anymore to get a new program going.
plus im at work, so if i didn't make stuff up to do id die of boredom.
rflores49202@sbcglobal.net
Link to comment
Share on other sites

"i've attached the code for the program that generated this report.
Its in the post settings".


Roberto, where is it?
Link to comment
Share on other sites

How can you justify re-writing the same code over and over again? If I where your boss man :p

How ever, If you wish to export values in a different way that isn't supported directly with a function inside Calypso. You should at least write something generic that can be applied to all plans.

To do so, you need to find out what characteristic you deal with, since .actual isn't always going to work. The way I personally do this is by using the instance variable: .classNameForOmLiteralArrayEncoding. This will tell you what type of characteristic you deal with as symbol. Add .string and you have a format easy to work with.
And then you just make a couple of conditions if the characteristic is one that doesn't respond well with .actual. Here is one of many solutions how to deal with one of them, a 2-point diameter. This also takes care of any potential loops that might exist.
for i = 1 to getCFNames().size
	selectCase getNominal(getParameterNamed(getCFNames(),i).killWhiteSpaces).classNameForOmLiteralArrayEncoding.asString
		case is == "OMCF2PointDistanceMeasured"
				if getActual(getParameterNamed(getCFNames(),i).killWhiteSpaces).asCollection.size > 1
					for j = 1 to (getActual(getParameterNamed(getCFNames(),i).killWhiteSpaces).asArray.size) / 2)
						if j > 1
							value=value+formatL(getMaxActual(getParameterNamed(getCFNames(),i).killWhiteSpaces,+j).actual,0,4)+"gx / "+formatL(getMinActual(getParameterNamed(getCFNames(),i).killWhiteSpaces,j).actual,0,4)+"gn^"+j+" "
						else
							value=formatL(getMaxActual(getParameterNamed(getCFNames(),i).killWhiteSpaces,+j).actual,0,4)+"gx / "+formatL(getMinActual(getParameterNamed(getCFNames(),i).killWhiteSpaces).actual,0,4,j)+"gn^"+j+" "
						endif
					next j
					bubble=strElement(2,chr(35),getParameterNamed(getCFNames(),i))
				else
					value=formatL(getMaxActual(getParameterNamed(getCFNames(),i).killWhiteSpaces).actual,0,4)+"gx / "+formatL(getMinActual(getParameterNamed(getCFNames(),i).killWhiteSpaces).actual,0,4)+"gn"
					bubble=strElement(2,chr(35),getParameterNamed(getCFNames(),i))
				endif
			display(bubble+": "+value)
	endSelect
next i
And if you just like to export specific characteristics, just make a condition. You can maybe put something in the name of those, in the example above, we look for a hash tag. And collect what ever is behind it. In my case, its the bubble no. The name of the characteristic might be something similar to "Ø10 - S1G15 - #123". And the result of the code is: "123: 0,5gx / 0,49gn" And if a loop exist it will show up with ^1, ^2 and so on.

I posted more examples in the old forum, that also dealt with other characteristics if you need more help along the way.
Link to comment
Share on other sites

Eric
You've shown this to me before, but i have no idea what im looking at.
Haha.
Like i said earlier i'm a total scrub when it comes to writing code, i just know my 1 little thing and i do it over and over.
but i don't have to rewrite that much code, i've already covered about every situation i can think of, so its just a matter of copying and pasting and making the change from "Profile #3" in one program to "Profile #5" in the next program, then change my variable to PRO5 and i'm done......
then generally since the program creates its own file paths and file names out of the user inputs and record heads once i've got 1 program up and running i can copy and dump into an entire family or programs in a matter of minutes, or as i save/as the record heads will update themselves in the new program.

Ive actually thought about taking some C++ classes at my local community college, but then i think about how boring it would be and i put it off for another year......
The pcm classes in Brighton are ok, but very basic from what i remember.
Link to comment
Share on other sites

Thank you Eric. That is a possible option for me. When using the Characteristic.xlt for reporting, I know that the Report.INI file will only work in this path; 'C:\Users\Public\Documents\Zeiss\CALYPSO\data\excel_report'. What about copying and re-naming the Report.INI file to a different location? The I quess that I would have to change something in the copied INI file to look for the newly created spreadsheet? Can this be done?
Link to comment
Share on other sites

 Share

×
×
  • Create New...