Nearest point in AutoCAD
Nearest point in AutoCAD
(OP)
Hi people...
Does anyone knows how could I get the nearest point of an entity of the point I inform?
Let's say I have a spline and in a top view I know one point (X and Y) which is really near it, and I need to know the Z coordinate of the spline there. I have a large experience in VBA with SolidWorks, Excel, etc... But completely new to AutoCAD VBA, I tried to found any method to simulate the Nearest Osnap, but could find. Any idea?
Best Regards,
Rodrigo Basniak
Does anyone knows how could I get the nearest point of an entity of the point I inform?
Let's say I have a spline and in a top view I know one point (X and Y) which is really near it, and I need to know the Z coordinate of the spline there. I have a large experience in VBA with SolidWorks, Excel, etc... But completely new to AutoCAD VBA, I tried to found any method to simulate the Nearest Osnap, but could find. Any idea?
Best Regards,
Rodrigo Basniak





RE: Nearest point in AutoCAD
I haven't done any acadvba in awhile..proe as of late..but i remember the 3d poly being a ugly variant ..used it to drive cnc code
RE: Nearest point in AutoCAD
The problem is that the coordinates I want are betwen the poins of Acad3dPolyline. :( I'm pretty sad that AutoCAD doesn't let you access this kind of data :(
I resolved the problem, but in a much longer way:
With the points of Acad3dPolyline I used polynomial interpolation and found the spline's equation... with the equation is easy to get any point on the spline. Too bad each spline has at least 100 points, so to find this equation I have to solve linear systems with around 100 equations each :(
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
You already have done the math, you just need to transfer the information from AutoCAD to VB for processing.
There is a learning curve but this site and www.tek-tips.com are great for getting quick and effective help.
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
You could develop programs at home to improve your productivity at work.
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
RE: Nearest point in AutoCAD
Haven't thought of that! Thanks! :)