NOT SURE IF THE MACRO IS STILL THERE. GOOD LUCK!
27982 wrote: THANKS, BUT I'M LOOKING FOR ONLY POINTS, I DO NOT WANT A CURVE TO CONNECT THEM.
You can import an excel list of co-ordinates, but only for use in a feature pattern. I know that you are asking for a sketch point only, but maybe you can use the features to create the sketch and then suppress the feature pattern?
You will need to save the excel list as a tab delimited text file for SW to be able to read as a set of X-Y co-ordinates.
Do you have SW Premium? If so, with ScanTo3D enabled, you can bring the points in from your excel spread sheet. Here's what you do:
If you have your X column and Y column add a third column for Z and fill it with zeros, then save the excel file as a .txt file. Then insert curve-curve thru XYZ points-select .txt file and insert curve. Then select curve and insert ref geometry-point and key spacing.
Forgot to add you can then hide the curve.
EveryOne i Did it its working
Dim xp As Process
On Error Resume Next
XlApp = GetObject(, "Excel.Application")
If Not XlApp Is Nothing Then
xp = Process.GetProcessesByName("Excel")(0)
XlApp = Nothing
If XlApp Is Nothing Then
XlApp = CreateObject("Excel.Application", )
If Not XlApp.ActiveWorkbook.Name = "Data.xlsx" Then
XlApp.Visible = True
XlApp.Visible = False
wksht = XlApp.Worksheets(1)
wksht = wksht.Workbooks(1).Worksheets(1)
Dim i As Integer
Dim j As Double
j = 1
For i = 2 To 28
x(j) = wksht.Cells(i, 1).value
y(j) = wksht.Cells(i, 2).value
z(j) = wksht.Cells(i, 3).value
x1(j) = wksht.Cells(i, 4).value
y1(j) = wksht.Cells(i, 5).value
z1(j) = wksht.Cells(i, 6).value
j = j + 1
Retrieving data ...