乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: garlictaste

[编程交流] Lisp: blinks the layer of the

[复制链接]

2

主题

14

帖子

12

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 12:29:46 | 显示全部楼层
"blink" and "hlight2" works fine here in acad2008 and 2010
 
That`s it! Thanks a lot:)
回复

使用道具 举报

15

主题

209

帖子

121

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
163
发表于 2022-7-6 12:33:51 | 显示全部楼层
Man, I wrote something like this about 10 years ago.  I used to work for a company that did a lot of 2d which created a bunch of different layers of differing  colors.  in order to find the correct part in all of those layers I wrote this routine to help.
 
It is old but it does still work.  User defined .ini. (change the .ini.lsp to .ini)
LAYER_HL.dcl
LAYER_HL.ini.lsp
LAYER_HL.lsp
回复

使用道具 举报

6

主题

249

帖子

247

银币

初来乍到

Rank: 1

铜币
30
发表于 2022-7-6 12:37:22 | 显示全部楼层
 
Cool!!!!!!!!!
回复

使用道具 举报

2

主题

14

帖子

12

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 12:40:16 | 显示全部楼层
:cry:mhhhhhhhh, here it does not work in 2008 and 2010, Tim:
 
Program Error: BAD ARGUMENT TYPE: STREAMP NIL
 
Did I something wrong?
 
-garlic-
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 12:44:09 | 显示全部楼层
Did you rename the .ini.lsp file to a .ini ?
 
Did you change the hard-coded path in the LISP to where you put the .ini file?
回复

使用道具 举报

1

主题

316

帖子

311

银币

初来乍到

Rank: 1

铜币
29
发表于 2022-7-6 12:45:36 | 显示全部楼层
 
Thanks Tim, Wonder if i will still be lisping 10 years from now.....'-)
回复

使用道具 举报

15

主题

209

帖子

121

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
163
发表于 2022-7-6 12:49:15 | 显示全部楼层
 
Funny I haven't used that prog in probably 6-8 years.  I just looked at the code....WOW   I would write it completely different today.  I saw the dat was 2001, the original (non dcl version) was written in 1997, and only blinked one color (green).
 
Ah the good old days.
 
 
-garlic-
 
You have to open the lisp and change the path to match your path (Sorry)
回复

使用道具 举报

2

主题

14

帖子

12

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 12:54:38 | 显示全部楼层
Tim: I got it ! Thanks a lot - it`s very good in acad 2008 and 2010 !
- garlic-
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 12:58:00 | 显示全部楼层
 
Thought I'd improve it a touch, click to isolate layer
 
  1. (defun c:hl2 (/ ss->list re-draw CODE ENT GR LAY LLST NSS NULLST OBJLST) (vl-load-com) ;; Lee Mac  ~  08.01.10 (vlax-map-collection   (vla-get-layers     (vla-get-ActiveDocument       (vlax-get-acad-object)))   (function     (lambda (x)       (setq llst (cons x llst))))) (defun ss->list (ss / i ent lst)   (setq i -1)   (while (setq ent (ssname ss (setq i (1+ i))))     (setq lst (cons ent lst))) lst) (defun re-draw (lst code)   (mapcar (function (lambda (x) (redraw x code))) lst))  (princ "\nMove Cursor Over Objects....")   (while (and (= 5 (car (setq gr (grread 't 4 2)))) (listp (cadr gr)))   (if (setq ent (car (nentselp (cadr gr))))     (progn       (setq lay    (cdr (assoc 8 (entget ent)))             ObjLst (ss->list (ssget "_X" (list (cons 8 lay)))))              (re-draw ObjLst 3)              (if (setq nss (ssget "_X" (list (cons -4 ""))))         (progn           (setq NulLst (ss->list nss))           (re-draw NulLst 2))))          (progn       (and ObjLst (re-draw ObjLst 4))       (and NulLst (re-draw NulLst 1))))) (and ObjLst (re-draw ObjLst 4)) (and NulLst (re-draw NulLst 1)) (if (listp (cadr gr))   (if (setq ent (car (nentselp (cadr gr))))     (progn       (setq lay (strcase (cdr (assoc 8 (entget ent)))))              (mapcar         (function           (lambda (layer)             (vla-put-layeron layer               (if (eq lay (strcase (vla-get-name layer)))                                  :vlax-true :vlax-false)))) llst)))) (princ))                 
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-5 10:09 , Processed in 1.193856 second(s), 68 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表