乐筑天下

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

[编程交流] lisp函数的到期日期

[复制链接]

2

主题

6

帖子

4

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-5 16:58:34 | 显示全部楼层 |阅读模式
你好
我需要帮助一个lisp函数的过期日期。我几乎不会写下面的lisp,我想添加一个到期日期。它将是vlx文件,在2017年1月1日无效。它需要一个警告,如“此函数已过期!”
 
Lisp程序是;
  1. (defun c:MKAtman ()
  2.   (command "CMDECHO" "0")(terpri)
  3.   (prompt "Setting layers")(princ)
  4.   (command "layer" "unlock" "*" "thaw" "*" "on" "*" "")
  5.   (command "layer" "m" "0" "c" "7" "" "l" "Continuous" "" "")
  6.   (if(not(tblsearch "LAYER" "000_Ahşap"))
  7.   (command "layer" "m" "000_Ahşap" "c" "white" "" "l" "Continuous" "" "d" "Ahşap İmalatlar" "000_Ahşap" "")
  8.   (command "layer" "m" "000_Ahşap" "c" "white" "" "l" "Continuous" "" "d" "Ahşap İmalatlar" "000_Ahşap" "y" ""))
  9.   (if(not(tblsearch "LAYER" "000_Andezit"))
  10.   (command "layer" "m" "000_Andezit" "c" "250" "" "l" "Continuous" "" "d" "Andezit Döşeme Kaplamaları" "000_Andezit" "")
  11.   (command "layer" "m" "000_Andezit" "c" "250" "" "l" "Continuous" "" "d" "Andezit Döşeme Kaplamaları" "000_Andezit" "y" ""))
  12.   (if(not(tblsearch "LAYER" "000_Antet"))
  13.   (command "layer" "m" "000_Antet" "c" "251" "" "l" "Continuous" "" "d" "ABB Antet" "000_Antet" "")
  14.   (command "layer" "m" "000_Antet" "c" "251" "" "l" "Continuous" "" "d" " ABB Antet" "000_Antet" "y" ""))
  15.   (if(not(tblsearch "LAYER" "000_Beton Parke"))
  16.   (command "layer" "m" "000_Beton Parke" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Beton Parke" "")
  17.   (command "layer" "m" "000_Beton Parke" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Beton Parke" "y" ""))
  18.   (if(not(tblsearch "LAYER" "000_Bitki"))
  19.   (command "layer" "m" "000_Bitki" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Bitki" "")
  20.   (command "layer" "m" "000_Bitki" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Bitki" "y" ""))
  21.   (if(not(tblsearch "LAYER" "000_Bitki İz"))
  22.   (command "layer" "m" "000_Bitki İz" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Bitki İz" "")
  23.   (command "layer" "m" "000_Bitki İz" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Bitki İz" "y" ""))
  24.   (if(not(tblsearch "LAYER" "000_Bordür"))
  25.   (command "layer" "m" "000_Bordür" "c" "180" "" "l" "Continuous" "" "d" "N/A" "000_Bordür" "")
  26.   (command "layer" "m" "000_Bordür" "c" "180" "" "l" "Continuous" "" "d" "N/A" "000_Bordür" "y" ""))
  27.   (if(not(tblsearch "LAYER" "000_Çim Tarama"))
  28.   (command "layer" "m" "000_Çim Tarama" "c" "64" "" "l" "Continuous" "" "d" "169,185,167" "000_Çim Tarama" "")
  29.   (command "layer" "m" "000_Çim Tarama" "c" "64" "" "l" "Continuous" "" "d" "169,185,167" "000_Çim Tarama" "y" ""))
  30.   (if(not(tblsearch "LAYER" "000_Duvar"))
  31.   (command "layer" "m" "000_Duvar" "c" "19" "" "l" "Continuous" "" "d" "N/A" "000_Duvar" "")
  32.   (command "layer" "m" "000_Duvar" "c" "19" "" "l" "Continuous" "" "d" "N/A" "000_Duvar" "y" ""))
  33.   (if(not(tblsearch "LAYER" "000_EPDM"))
  34.   (command "layer" "m" "000_EPDM" "c" "white" "" "l" "Continuous" "" "d" "142,95,87" "000_EPDM" "")
  35.   (command "layer" "m" "000_EPDM" "c" "white" "" "l" "Continuous" "" "d" "142,95,87" "000_EPDM" "y" ""))
  36.   (if(not(tblsearch "LAYER" "000_Eski Eğri"))
  37.   (command "layer" "m" "000_Eski Eğri" "c" "253" "" "l" "Dashed2" "" "d" "N/A" "000_Eski Eğri" "")
  38.   (command "layer" "m" "000_Eski Eğri" "c" "253" "" "l" "Dashed2" "" "d" "N/A" "000_Eski Eğri" "y" ""))
  39.   (if(not(tblsearch "LAYER" "000_Havuz"))
  40.   (command "layer" "m" "000_Havuz" "c" "132" "" "l" "Continuous" "" "d" "N/A" "000_Havuz" "")
  41.   (command "layer" "m" "000_Havuz" "c" "132" "" "l" "Continuous" "" "d" "N/A" "000_Havuz" "y" ""))
  42.   (if(not(tblsearch "LAYER" "000_Kauçuk"))
  43.   (command "layer" "m" "000_Kauçuk" "c" "white" "" "l" "Continuous" "" "d" "142,95,87" "000_Kauçuk" "")
  44.   (command "layer" "m" "000_Kauçuk" "c" "white" "" "l" "Continuous" "" "d" "142,95,87" "000_Kauçuk" "y" ""))
  45.   (if(not(tblsearch "LAYER" "000_Kent Mobilyası"))
  46.   (command "layer" "m" "000_Kent Mobilyası" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Kent Mobilyası" "")
  47.   (command "layer" "m" "000_Kent Mobilyası" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Kent Mobilyası" "y" ""))
  48.   (if(not(tblsearch "LAYER" "000_Koşu Yolu"))
  49.   (command "layer" "m" "000_Koşu Yolu" "c" "34" "" "l" "Continuous" "" "d" "N/A" "000_Koşu Yolu" "")
  50.   (command "layer" "m" "000_Koşu Yolu" "c" "34" "" "l" "Continuous" "" "d" "N/A" "000_Koşu Yolu" "y" ""))
  51.   (if(not(tblsearch "LAYER" "000_KüpTaş"))
  52.   (command "layer" "m" "000_KüpTaş" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_KüpTaş" "")
  53.   (command "layer" "m" "000_KüpTaş" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_KüpTaş" "y" ""))
  54.   (if(not(tblsearch "LAYER" "000_Mevsimlik Tarama"))
  55.   (command "layer" "m" "000_Mevsimlik Tarama" "c" "210" "" "l" "Continuous" "" "d" "N/A" "000_Mevsimlik Tarama" "")
  56.   (command "layer" "m" "000_Mevsimlik Tarama" "c" "210" "" "l" "Continuous" "" "d" "N/A" "000_Mevsimlik Tarama" "y" ""))
  57.   (if(not(tblsearch "LAYER" "000_Ölçü"))
  58.   (command "layer" "m" "000_Ölçü" "c" "217" "" "l" "Continuous" "" "d" "N/A" "000_Ölçü" "")
  59.   (command "layer" "m" "000_Ölçü" "c" "217" "" "l" "Continuous" "" "d" "N/A" "000_Ölçü" "y" ""))
  60.   (if(not(tblsearch "LAYER" "000_Sert Tarama"))
  61.   (command "layer" "m" "000_Sert Tarama" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Sert Tarama" "")
  62.   (command "layer" "m" "000_Sert Tarama" "c" "white" "" "l" "Continuous" "" "d" "N/A" "000_Sert Tarama" "y" ""))
  63.   (if(not(tblsearch "LAYER" "000_Sınır"))
  64.   (command "layer" "m" "000_Sınır" "c" "20" "" "l" "Continuous" "" "d" "N/A" "000_Sınır" "")
  65.   (command "layer" "m" "000_Sınır" "c" "20" "" "l" "Continuous" "" "d" "N/A" "000_Sınır" "y" ""))
  66.   (if(not(tblsearch "LAYER" "000_Slopeticks"))
  67.   (command "layer" "m" "000_Slopeticks" "c" "252" "" "l" "Continuous" "" "d" "Şev Çizgisi" "000_Slopeticks" "")
  68.   (command "layer" "m" "000_Slopeticks" "c" "252" "" "l" "Continuous" "" "d" "Şev Çizgisi" "000_Slopeticks" "y" ""))
  69.   (if(not(tblsearch "LAYER" "000_Tasarım"))
  70.   (command "layer" "m" "000_Tasarım" "c" "50" "" "l" "Continuous" "" "d" "N/A" "000_Tasarım" "")
  71.   (command "layer" "m" "000_Tasarım" "c" "50" "" "l" "Continuous" "" "d" "N/A" "000_Tasarım" "y" ""))
  72.   (if(not(tblsearch "LAYER" "000_Terrazo Granit AG"))
  73.   (command "layer" "m" "000_Terrazo Granit AG" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Terrazo Granit AG" "")
  74.   (command "layer" "m" "000_Terrazo Granit AG" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Terrazo Granit AG" "y" ""))
  75.   (if(not(tblsearch "LAYER" "000_Terrazo Bazalt AG"))
  76.   (command "layer" "m" "000_Terrazo Bazalt AG" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Terrazo Bazalt AG" "")
  77.   (command "layer" "m" "000_Terrazo Bazalt AG" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Terrazo Bazalt AG" "y" ""))
  78.   (if(not(tblsearch "LAYER" "000_Terrazo Washbeton Yİ"))
  79.   (command "layer" "m" "000_Terrazo Washbeton Yİ" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Terrazo Washbeton Yİ" "")
  80.   (command "layer" "m" "000_Terrazo Washbeton Yİ" "c" "250" "" "l" "Continuous" "" "d" "N/A" "000_Terrazo Washbeton Yİ" "y" ""))
  81.   (if(not(tblsearch "LAYER" "000_Yazı"))
  82.   (command "layer" "m" "000_Yazı" "c" "220" "" "l" "Continuous" "" "d" "N/A" "000_Yazı" "")
  83.   (command "layer" "m" "000_Yazı" "c" "220" "" "l" "Continuous" "" "d" "N/A" "000_Yazı" "y" ""))
  84.   (if(not(tblsearch "LAYER" "000_Yeni Eğri"))
  85.   (command "layer" "m" "000_Yeni Eğri" "c" "20" "" "l" "Continuous" "" "d" "N/A" "000_Yeni Eğri" "")
  86.   (command "layer" "m" "000_Yeni Eğri" "c" "20" "" "l" "Continuous" "" "d" "N/A" "000_Yeni Eğri" "y" ""))
  87.   (command "layer" "s" "0" "")
  88.   (command "CMDECHO" "1")
  89.   (prompt "Tüm Layerlar Başarıyla Oluşturulmuştur.")
  90.   (princ)
  91.   );end defun
回复

使用道具 举报

8

主题

71

帖子

66

银币

初来乍到

Rank: 1

铜币
43
发表于 2022-7-5 17:04:59 | 显示全部楼层
检查下面的链接
 
http://www.cadtutor.net/forum/showthread.php?54624-限时Lisp
回复

使用道具 举报

37

主题

264

帖子

236

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
185
发表于 2022-7-5 17:10:08 | 显示全部楼层
别忘了提及“联系人…”部分;-)
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 17:16:17 | 显示全部楼层
建议您下次列出图层详细信息(name1 col1 ltype1 name2 col2 ltype2……。然后只需获得列表的长度,使用它重复查看3个变量,然后进行表格搜索。整个lisp只有几行长,而不是对每个图层重复layer命令。
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 17:20:37 | 显示全部楼层
还有其他方法,比如你有50次,现在是49次,48次。。。通过lisp将数字写入注册表。重新设置日期有点容易捏造,如果你知道它的用途的话,可以继续使用。另一种方法是读取网站上的URL,通过计数器或正确的日期检查其使用情况。您可以检查Autocad序列号是否停止复制到许多机器。如果软件有用,人们会尝试将其分发给他人。
 
如果您有很多例程,那么很容易在包含检查例程的lisp中添加一个标题,这样就可以正常运行。复制标题+Lisp1 LISP1vlx
回复

使用道具 举报

2

主题

6

帖子

4

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-5 17:24:06 | 显示全部楼层
谢谢大家。
 
我试过了,但还是不行。我不是lisp方面的专家,所以我不能听从Bigal的建议。所以,我还是不知道怎么做。
回复

使用道具 举报

2

主题

6

帖子

4

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-5 17:29:28 | 显示全部楼层
我不得不不好意思地再次求助。我还是修不好。
 
"http://www.cadtutor.net/forum/showth...ime-bound-Lisp“那个话题对我来说不管用。
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 17:36:50 | 显示全部楼层
这是另一段代码,稍微添加了一点,放在lisp的开头。(退出)将停止运行lisp。我们有多个LISP,所以我们在发布时使用DOS命令复制安全性添加了安全代码。lsp+lisp1。lsp c:\\securty\\lisp1。然后lsp将编译成FAS。如果你有很多事情要做的话,你也可以编写制作fas的脚本。
 
  1. (if (< (rtos (getvar "cdate") 2 0) "20170101") ; 1st Jan 2017
  2. (princ)
  3. (progn
  4. (Alert "Contact Merve for Renewal\n\nPlease call us on 12334567 to discuss continued use")
  5. (exit)
  6. )
  7. )
回复

使用道具 举报

2

主题

6

帖子

4

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-5 17:40:24 | 显示全部楼层
 
成功了!非常感谢。这对我来说非常重要。
回复

使用道具 举报

5

主题

1074

帖子

1088

银币

初来乍到

Rank: 1

铜币
9
发表于 2022-7-5 17:46:11 | 显示全部楼层
 
干得好BIGAL。
 
我说话不流利,所以如果这是错误的,或者太明显而无法提及,请原谅我。
我猜想,如果用户在记事本中打开这个lisp,删除这个最新添加的内容并保存它,就可以继续使用lisp而不会造成进一步的中断?
毫无疑问,梅尔夫知道这一点,如果我是正确的话,他也应该知道。
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-13 13:22 , Processed in 0.643742 second(s), 72 queries .

© 2020-2025 乐筑天下

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