乐筑天下

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

[编程交流] lisp to unlock table cells (th

[复制链接]

42

主题

173

帖子

132

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
220
发表于 2022-7-5 16:11:24 | 显示全部楼层 |阅读模式
Greetings everyone ..
i have a tables inserted to autocad from excel and these tables are locked for editing ... is there a method to unlock these tables and remove their data links using lisp routine ?
 
 
thanks for reading
best regards..
回复

使用道具 举报

rlx

21

主题

1505

帖子

1551

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
81
发表于 2022-7-5 16:19:52 | 显示全部楼层
I have found a few lisps on the net (because I rarely use tables my self) and combined them but its slow ...
 
 

[code] ; http://adndevblog.typepad.com/au ... -using-activex.html; By Wayne Brill(defun c:addMyTable ( / ActiveDocument mSpace pt              myTable nRows nCols row cell )  (vl-load-com)  (setq ActiveDocument (vla-get-activedocument             (vlax-get-acad-object)))  (setq mSpace(vla-get-modelspace ActiveDocument))  (setq pt (vlax-make-safearray vlax-vbDouble                                   '(0 . 2)))  ;insertion point for the table  (vlax-safearray-fill pt '(2.0 2.0 0.0))  (setq myTable     (vla-addtable mSpace pt 5 5 10 30))  (vla-setcelltextheight myTable 0 0 5)  (vla-settext myTable 0 0 "myTable")   ;rows and columns zero based  (setq nRows(- (vla-get-rows myTable) 1))  (setq nCols(- (vla-get-columns myTable) 1))   ; rows and columns after row 0, column 0  (setq row 1)  (setQ cell 0)   ; loop through cells  (while (vla-object myTable))     (setq nRows (- (vla-get-rows myTable) 1))     (setq nCols (- (vla-get-columns myTable) 1))     (setq row 1)      (setq cell 0)     (princ (strcat "\n\nNumers : " (itoa nRows) " rows , " (itoa nCols) " columns\nPress any key to continue"))     (grread)     ; thank you Grrr/Lee/Tharwat     ; http://www.cadtutor.net/forum/sh ... whole-table-at-once)     (vla-put-RegenerateTableSuppressed myTable :vlax-true)     (while (
回复

使用道具 举报

66

主题

1552

帖子

1514

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
325
发表于 2022-7-5 16:30:45 | 显示全部楼层
 
Rlx you have to wrap it like this:
  1. (vla-put-RegenerateTableSuppressed ACADTableObj :vlax-true); < Manipulate the table here >(vla-put-RegenerateTableSuppressed ACADTableObj :vlax-false)
回复

使用道具 举报

66

主题

1552

帖子

1514

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
325
发表于 2022-7-5 16:42:32 | 显示全部楼层
 
No problem, I didn't knew about this either so I had to wait 5 minutes to generate a sorted room table for 90 different rooms, until one day I learned about this on the forums from Lee or Tharwat (don't really remember who was), and now its immediately created or manipulated. So shout outs to them!
 
回复

使用道具 举报

rlx

21

主题

1505

帖子

1551

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
81
发表于 2022-7-5 16:50:38 | 显示全部楼层
Thank you Lee / Tharwat / Grrr
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-5 17:00:23 | 显示全部楼层
Thank you guys.
回复

使用道具 举报

42

主题

173

帖子

132

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
220
发表于 2022-7-5 17:04:29 | 显示全部楼层
thank you all ... your contributions are greatly appreciated ... thanks again
回复

使用道具 举报

42

主题

173

帖子

132

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
220
发表于 2022-7-5 17:15:49 | 显示全部楼层
 
this is The Missing Piece Puzzle that solved a lot of table processing functions that i made before ... thanks ,Grrr
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-14 21:07 , Processed in 0.370398 second(s), 68 queries .

© 2020-2025 乐筑天下

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