I hope someone can help me. I am trying to use TablePatternFeatureData and can't seem to get the sintax to work. I want to use PointArray or LoadPointsFromFile, but neither will work even if a copy the code from the SolidWorks help file.
I was using "SavePointsToFile" to get a sample file format and I was experimenting with the PointArray command.
I have sheetmeal part that has a 4-hole pattern in it that I need to repeat 0-7 times for a max total 8 occurances of the pattern. I can load the array points either from a file (preferred method) or set the array directly.
I have never used TablePatternFeatureData calls. I only have SW2004 at home and cannot seem to find the example you refer to. Is this example in SW2005? What is it's exact title on the help screens?
You still did not specify what does not work. Do you get any error messages or does nothing happen when you run the code?
'***********************************************************
Sub main()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.modelDoc
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFeat As SldWorks.Feature
Dim swTableFeatData As SldWorks.TablePatternFeatureData
Dim swRefPt As SldWorks.Vertex
Dim swCoordSys As SldWorks.Feature 'Object
Dim vBasePt As Variant
Dim vFace As Variant
Dim vFeat As Variant
Dim vPt As Variant
Dim nPtType As Long
Dim vRefPtParam As Variant
Dim bRet As Boolean
Dim i As Long
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swFeat = swSelMgr.GetSelectedObject5(1)
Set swTableFeatData = swFeat.GetDefinition
' Roll back to get the reference point
bRet = swTableFeatData.AccessSelections(swModel, Nothing): Debug.Assert bRet