How to create a table of X,YZ Points for Inpection?
How to create a table of X,YZ Points for Inpection?
(OP)
Hi all:
Im trying to create a table of X,Y,Z points in solidworks so we can inspect a surface.
Optimally im looking for some way of placing grid points on the surface, then creating a table of X,Y,Z coordinates so our inspection department can inspect from this table.
Ideas I have is to make a 3D sketch an place points on the surface. The problem is how to transfer that information in to table format.
Any other ideas?
Thanks
rlara






RE: How to create a table of X,YZ Points for Inpection?
Jeff Mowry
www.industrialdesignhaus.com
Reason trumps all. And awe trumps reason.
RE: How to create a table of X,YZ Points for Inpection?
First nice website, looks clean..
Well i could do that maybe put the model next to the CMM and have the inspector check each point as he goes. Or maybe copy/paste that into excel and print out a table. But that it self would be a lot of work.
Do you know of a way of retrieving the X,Y,Z data from the parameters window? maybe a macro that grabs the X,Y,Z info as a pick a point?
Thanks
rlara
RE: How to create a table of X,YZ Points for Inpection?
thread559-137637
Chris
Systems Analyst, I.S.
SolidWorks 06 4.1/PDMWorks 06
AutoCAD 06
ctopher's home (updated 06-21-06)
RE: How to create a table of X,YZ Points for Inpection?
What you're trying to do sounds like plenty of work to me. Macros aren't my sort of gig, but perhaps someone else here could chime in with something helpful, if Chris' post below doesn't help. Or perhaps try working with a macro of your own and see if you can get it to work. Otherwise, this process will be quite tedious if you have lots of points.
Jeff Mowry
www.industrialdesignhaus.com
Reason trumps all. And awe trumps reason.
RE: How to create a table of X,YZ Points for Inpection?
PC/DMIS and Calypso can both import math data. The help files for both packages can give insight as to what math data types they can read.
Regards,
Anna Wood
SW06 SP4.1 x64, WinXP x64
Dell Precision 380, Pentium D940, 4 Gigs RAM, FX3450
www.auerprecision.com
RE: How to create a table of X,YZ Points for Inpection?
RE: How to create a table of X,YZ Points for Inpection?
Our CMM system is kind of outdated so there is no option for import of iges file.
Handleman:
Ran the macro and it works great although its still a lot a work as we are talking about 1760 points or so.
I think best option would be to have some one else laser scan the component and then compare the data to the cad model.
Thanks for all the comments.
RE: How to create a table of X,YZ Points for Inpection?
RE: How to create a table of X,YZ Points for Inpection?
Handleman:
Actually I was looking for a way to select several points and get the coordinates from them. The macro you sent seems like it would work well for small number of points but for this application it would take for ever.
The only thing ive done until now is made a Grid on the surface using split lines, so I have a .250 X .250 grid on a on a surface where I can pick intersection points and measure them.
rlara
RE: How to create a table of X,YZ Points for Inpection?
CODE
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Public Pfx As String
Dim myNote As SldWorks.Note
Dim SelMgr As SldWorks.SelectionMgr
Dim mySketchPoint As SldWorks.SketchPoint
Dim mySketch As SldWorks.Sketch
Dim AllSketchPoints As Variant
Const FMAT As String = "0.00"
Const SF As Double = 1000
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Const FirstRow As Long = 4
Const FirstCol As Long = 2
Dim CurRow As Long
Dim IDCol As Long
Dim Xcol As Long
Dim Ycol As Long
Dim Zcol As Long
Dim PtID As Variant
Dim i As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
If (SelMgr.GetSelectedObjectType3(1, -1) <> 11) And (SelMgr.GetSelectedObjectType3(1, -1) <> 25) Then
MsgBox "Select a sketch point of a 3D sketch and run macro again"
Exit Sub
End If
Set mySketchPoint = SelMgr.GetSelectedObject6(1, -1)
Set mySketch = mySketchPoint.GetSketch
AllSketchPoints = mySketch.GetSketchPoints2
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets("Sheet1")
CurRow = FirstRow
IDCol = FirstCol
Xcol = FirstCol + 1
Ycol = FirstCol + 2
Zcol = FirstCol + 3
xlSheet.Cells(CurRow, IDCol).Value = "'Point ID"
xlSheet.Cells(CurRow, Xcol).Value = "'X Coord"
xlSheet.Cells(CurRow, Ycol).Value = "'Y Coord"
xlSheet.Cells(CurRow, Zcol).Value = "'Z Coord"
CurRow = CurRow + 1
For i = 0 To UBound(AllSketchPoints)
PtID = AllSketchPoints(i).GetID
xlSheet.Cells(CurRow, IDCol).Value = PtID(0) & "," & PtID(1)
xlSheet.Cells(CurRow, Xcol).Value = Format(AllSketchPoints(i).X * SF, FMAT)
xlSheet.Cells(CurRow, Ycol).Value = Format(AllSketchPoints(i).Y * SF, FMAT)
xlSheet.Cells(CurRow, Zcol).Value = Format(AllSketchPoints(i).Z * SF, FMAT)
CurRow = CurRow + 1
Next i
Part.ClearSelection
Part.WindowRedraw
End Sub
RE: How to create a table of X,YZ Points for Inpection?
RE: How to create a table of X,YZ Points for Inpection?
Yes exactly Fivever for me to get a table and then for the inspector to punch in each number in to check it so I guess that would total sixever.
So knowing this i will have to convince my boss to try something new like a laser scan instead of having us do all this number typing.
If I can’t convince him then Ill post some good finger stretch exercises for jobs requiring large amounts of clicking.
Thanks Handleman for the macro ill try it out.
RE: How to create a table of X,YZ Points for Inpection?
To me it makes the most sense to tessalate your model to a very high tolerance. Save as .stl at the highest tolerance in the coordinate system of choice. Then convert this stl file to ascii xyz. Bingo, you have a huge xyz file of your model. Now just position your actual part in the same coordinate system as your saved model. Start taking points with your CMM. Collect tons of points. There are graphical tools, 3d spreadsheet tools, cad tools, polygon tools, RE tools, even tools in solidworks (point import macro, or get 2007) to do measurement and deviation analysis. Send me your CAD model and your CMM points and some money (joke) and I'll take the time to do it for you.
RFUS
RE: How to create a table of X,YZ Points for Inpection?
But it looks like we found someone to do the inspection let see how it comes out.
thanks
rlara