RickyD302 发表于 2022-7-6 09:39:59

需要转换的例程

我正在寻找一个例程或lisp,vba。net将我在表格单元格中使用的公式和字段转换为显示值但仍保持表格的简单文本。
我总是可以把桌子炸开,但是。。。。我有一些例程可以将多行文字中的字段转换为文本,但我似乎找不到任何表的代码,也没有足够的经验编写自己的代码。TIA

SOliver 发表于 2022-7-6 09:50:23

这会让你上路:
 
运行脚本之前。为了以防万一,我现在已经将其添加到上述来源中

RickyD302 发表于 2022-7-6 09:55:46

试试这个VB。Net代码,刚刚快速测试
1

SOliver 发表于 2022-7-6 10:02:09

谢谢李,这也很有效,但它花了很长时间运行。Windows 72011 64位。这个网络速度快得多。

fixo 发表于 2022-7-6 10:09:02

RickyD302 发表于 2022-7-6 10:12:19

Thanks...just need to figure out how to get it into autocad......I have a copy of visual 2005 so I'm ASSuMEing I create a vb project and then copy the code it for starters?Here again links and pointers are appreciated

RickyD302 发表于 2022-7-6 10:17:40

Thank you Fixo! that worked....got some interesting warnings when I brought it into visual studio 8.....Man thanks again!

fixo 发表于 2022-7-6 10:26:48

I could be able to create the project just in Sharpdevelop 3.2
but I'm not sure if this will be working on your end
Glad you fixed it by yourself though
Cheers
 
~'J'~

RickyD302 发表于 2022-7-6 10:28:25

Yea me too...I've been wanting to medal in vb.net but ....just the time it takes.....I commend you and any others who can just sit down and knock out code!

Lee Mac 发表于 2022-7-6 10:35:45

This seems complicated, why not just:
 

(defun c:test ( / e i j o s ) (vl-load-com) (if   (and   (setq e (car (entsel "\nSelect Table: ")))   (eq "AcDbTable" (vla-get-Objectname (setq o (vlax-ename->vla-object e))))   )   (repeat (setq i (vla-get-rows o)) (setq i (1- i))   (repeat (setq j (vla-get-columns o))       (setq s (vla-getText o i (setq j (1- j))))       (vla-deletecontent o i j)       (vla-settext o i j s)   )   ) ) (princ))
页: [1] 2
查看完整版本: 需要转换的例程