Continue to Site

Welcome to 3DCADForums

Join our CAD community forums where over 25,000 users interact to solve day to day problems and share ideas. We encourage you to visit, invite you to participate and look forward to your input and opinions. Acrobat 3D, AutoCAD, Catia, Inventor, IronCAD, Creo, Pro/ENGINEER, Solid Edge, SolidWorks, and others.

Lisp to convert points to blocks..?

4

4StringHell

Guest
Hello all !!!

I'm a complete rookie to the site but ma somewhat desperate to find a lisp routine that will convert points into blocks using the same insertion point. Anyone know if this is possible?

I came across Geotools which sounds like it does it but I dont want to have to buy that whole package just to do one task.

Any help would be greatly appreciated!!

Cheers
 
What version of AutoCAD?

Hello 4StringHell,

Please tell us what version of AutoCAD you're running.

Thanks.
3DCADTips Help Desk :cool:
 
Got this from the Autodesk discussion board.

I found this on the Autodesk discussion boards:


Courtesy of: Jeff Mishler
This does exactly this. You must pass it the block name and the desired
scale, like so:
(pt2block "well" 100)

(defun pt2block (bname scale / ss i ent elist)
(if (and (tblobjname "BLOCK" bname)
(setq ss (ssget '((0 . "POINT"))))
)
(progn
(setq i -1)
(while (setq ent (ssname ss (setq i (1+ i))))
(setq elist (entget ent))
(entmake (list (cons 0 "INSERT")
(cons 2 bname)
(assoc 10 elist)
(assoc 8 elist)
(cons 41 scale)
(cons 42 scale)
(cons 43 scale)
(cons 50 0)
)
)
(entdel ent)
)
)
)
)

CADMiester
 
Try this LISP routine...

Hello 4StringHell,

Here is a LISP routine you can try courtesy of Holger Brischke:

Lisp 'PKT_BLK'

Good Luck
3DCADTips Help Desk :cool:
 

Attachments

  • pkt_blk.zip
    9 KB · Views: 271
4StringHell said:
Hello all !!!

I'm a complete rookie to the site but ma somewhat desperate to find a lisp routine that will convert points into blocks using the same insertion point. Anyone know if this is possible?

I came across Geotools which sounds like it does it but I dont want to have to buy that whole package just to do one task.

Any help would be greatly appreciated!!

Cheers
More thatn just the autocad version you are using, please tell briefly what are you trying to achieve.
are you trying to create blocks/shapes out of points, or do you need to create a 3D terrain?
 
Another LISP routine...

Hello 4StringHell,

Here is another routine we located off the Autodesk discussion board.

Reply From: Phil Clark
Date: May/23/06 - 18:41 (CDT)
You might check this out. Wrote it a long time ago (and frankly forgot
about it). It will replace not only points, but circles, arcs, text, and
other blocks (entities with one significant point) with a specified block.
Gives options for replacing objects globally or only specified layer and
scaling, rotation, and exploding of block.

Hope this helps.
3DCADTips Help Desk :cool:
 

Attachments

  • multins.zip
    3.8 KB · Views: 200
Hi, I know that this is quite some digging, but I am dealing with the same problem...

I have a file with lots of normal cad points (more than 1000) distributed in several layers, that I want to replace with blocks for general editing purposes.

I Have tried the lisp file and it did not work in autoCAD 2010. Since I do not know how to program LISP, how can I do this without having it the hard way?

Thanks in advance.
 
.

Hello 4StringHell,

Here is a LISP routine you can try courtesy of Holger Brischke:

Lisp 'PKT_BLK'

Good Luck
3DCADTips Help Desk

--------------------------------------------

hey good lisp how do you change it to english?
 
PKT_BLK works great

PKT_BLK works great. Thank you. Below is a Google-translation (German-English) of the readme file to help you with installation instructions.

Thanks again - I changed 23400 points to blocks in an instant. Nice!!!


readme.txt:

Exchanging points against blocks


AutoCAD Release: R2000
(Presumably down-and upward-compatible)

Version: 1 / 1

Note: Freeware - Freeware - freeware

Start calling: pkt_blk

required files: pkt_blk.vlx (program)
pkt_blk.mnu (menu - tool box)
pkt_blk.mnl (Menu - charging instructions)
pkt_blk.bmp (Menu - Button Image)

Restrictions:% (unknown)

Programs: CADlon - Lisp over night!
Holger Brischke
Expresstools 2 German Project
Tel: +49 (0) 681/989 06 84
mobile: +49 (0) 175/205 88 77
mailto: [email protected]

Installation: all files in a copy Acad search path
Embed customize menu: Tools-> Menus ... (Menu)
or: _.menuload (in command line)
! Call
imm following dialog box:
[Search] - search pkt_blk.mnu
[Shop]

Now, should the tool box pkt_blk are available!


Program Description

With this tool you can exchange points for blocks. A dialog box following program options are set.
- Replace all points / points selected
- Selection of the points limit on certain layers? If Yes -> the layer can be selected from a list.
- Block that will be inserted in place of the points. Existing blocks are listed.

If you insert a block name that is not present in the drawing, a "standard" block is generated and inserted. This is an X with the line length of 5x5 drawing entity; whereas

Notes on suggestions and criticism, I would look forward to.

Holger Brischke
 

Articles From 3DCAD World

Sponsor

Back
Top