Hi,
I imported coordinates points and I am wondering how to convert all those points into small sphere. Thanks in advance.
Solved! Go to Solution.
Solved by leeminardi. Go to Solution.
By "imported coordinates points" do you mean Point objects? If not, in what form are the coordinates imported?
@williams_cory_a wrote:
Yes
Then it shouldn't be too hard to come up with a routine that will replace the Point objects with Spheres. All Point objects in the drawing? All Points on a certain Layer? All Points only among a User selection? Should the Spheres be 3D Solids, or would you want to use a Sphere defined into a Block, with its insertion point in the middle? Make or Insert them all on a particular Layer, or on the Layer of the Points they replace? Always the same Sphere radius, or ask the User for the radius, or designate different radii by Layer or some other criterion? Etc.
I would like to have the spheres as 3D solids and not blocks. The spheres can all be on the same layer and a determined radius for all. I’ve done it before but can’t remember how
If yoou do not have the file with the original input data for creating the points you could use dataextraction to create an Excel (.xls) file and then use Excel to create the commands to add the spheres.
For example, here's sample output from dataextraction (columns A through E).
Cell F1 contains
=CONCATENATE("_sphere ",C2,",",D2,",",E2," ",1)
The ending 1 is the sphere radius. Change this as desired or reference a cell containing the radius. Fill down F1 to the last row of data.
Copy column F to the clipboard then paste into the command line in AutoCAD.
@williams_cory_a wrote:
... the spheres as 3D solids and not blocks. The spheres can all be on the same layer and a determined radius for all. ....
In simplest terms, lightly tested:
(defun C:P2S (/ ss n pt); = Point(s) {to} Sphere(s)
(if (setq ss (ssget '((0 . "POINT"))))
(repeat (setq n (sslength ss)); then
(setq pt (ssname ss (setq n (1- n))))
(command "_.sphere" "_non" (getpropertyvalue pt "Position") 1.0);;;<--EDIT radius
(entdel pt); <--optional
); repeat
); if
(prin1)
)
Might come in handy, too. Not only for this task.
There is an old program (not ours) FRTO - replace anything with anything.
Can try our experimental subproject XDPoint. With the XDPOINT_CREATE command can create point objects (blocks, points, 3DSolids, lines, etc.) on "basic" objects (points, polylines, splines, hatches etc.). Created point objects will be linked to their base objects. And when moving, changing objects, can restore the relative position and properties of the linked point objects with the XDPOINT_UPDATE command.
Can't find what you're looking for? Ask the community or share your knowledge.