乐筑天下

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

[编程交流] 请帮我用LEE MAC

[复制链接]

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 17:37:19 | 显示全部楼层
我会按照李的建议使用他的剧本作者,但如果你想换一种方式的话
 
此处:
 
[列表]
  • fname是块
  • '(7.6911 3.3174)是插入点
  • 1.4是x刻度
  • “”表示输入,即使用x刻度值作为y刻度
  • 0是旋转
  • AV是一个用于设置属性值的变量
    [/列表]
    我建议进行以下更改:
    1. (command "insert" fname '(7.6911 3.3174) 1.4 "" 0 [highlight]AV[/highlight])

    但是,这仍然假设ATTREQ=1,并且块只有一个属性。要完全避免属性提示,只需将ATTREQ设置为0。
  • 回复

    使用道具 举报

    5

    主题

    28

    帖子

    23

    银币

    初来乍到

    Rank: 1

    铜币
    25
    发表于 2022-7-5 17:40:52 | 显示全部楼层
    先生
     
    我更改了ATTREQ=0,并按如下方式编辑了代码,如果错误,请查看并编辑
     
    1. (command "_.-insert" fname "_S" 1.4 "_R" 0.0 "_non" '(7.6911 3.3174) "YourAttributeValue")

     
     
     
     
    回复

    使用道具 举报

    106

    主题

    1万

    帖子

    101

    银币

    顶梁支柱

    Rank: 50Rank: 50

    铜币
    1299
    发表于 2022-7-5 17:42:33 | 显示全部楼层
     
    如果要将ATTREQ更改为0,则不应提供属性值:
    1. 9

    您也不再需要输入和旋转响应,因为已经提供了这些响应(“\u S”1.4和“\u R”0.0)。
     
    请花些时间研究我帖子中的评论,并在命令行手动输入-INSERT命令的提示,以便了解程序的工作方式。
     
    我看到您还将函数定义更改为“c:dee”,因此,需要对其进行如下评估:
    1. 10
    回复

    使用道具 举报

    5

    主题

    28

    帖子

    23

    银币

    初来乍到

    Rank: 1

    铜币
    25
    发表于 2022-7-5 17:48:03 | 显示全部楼层
    180111j3abyl1gap000bmn.jpg
    180113ygcgfngu6w77wmgg.jpg
    回复

    使用道具 举报

    114

    主题

    1万

    帖子

    1万

    银币

    中流砥柱

    Rank: 25

    铜币
    543
    发表于 2022-7-5 17:48:29 | 显示全部楼层
    In your DEE.lsp, I notice that your variable 'AV' is not defined - this will cause the Script to terminate.
    回复

    使用道具 举报

    5

    主题

    28

    帖子

    23

    银币

    初来乍到

    Rank: 1

    铜币
    25
    发表于 2022-7-5 17:54:44 | 显示全部楼层
    Sir,
     
    Can you defined , i don't have any knowledge about this  
     
     
     
     
     
    回复

    使用道具 举报

    114

    主题

    1万

    帖子

    1万

    银币

    中流砥柱

    Rank: 25

    铜币
    543
    发表于 2022-7-5 17:56:36 | 显示全部楼层
     
    How should I know what value to define it to use?
     
    The variable is setting the attribute value for your block:
    1. (command "insert" fname '(7.6911 3.3174) 1.4 "" 0 [highlight]AV[/highlight])
    Here:
     


    • fname is the block
    • '(7.6911 3.3174) is the insertion point
    • 1.4 is the x-scale
    • "" means ENTER, i.e. use the x-scale value for the y-scale
    • 0 is the rotation
    • AV is a variable to set the attribute value

    I would suggest the following changes:
    1. (command "_.-insert" fname "_S" 1.4 "_R" 0.0 "_non" '(7.6911 3.3174) "YourAttributeValue")
    However, this still assumes that ATTREQ=1 and that your block has only a single attribute. To avoid the attribute prompt altogether, simply set ATTREQ=0.
    回复

    使用道具 举报

    5

    主题

    28

    帖子

    23

    银币

    初来乍到

    Rank: 1

    铜币
    25
    发表于 2022-7-5 17:59:54 | 显示全部楼层
    Sir,
     
    I CHANGED  ATTREQ=0 , And i edited the code as follows , please see and edit if its wrong
     
    1. (defun c:dee( / fname)   (mapcar 'setvar '("cmdecho" "insunits" "dimasz") '(0 4 3.0))   (if (findfile (setq fname "c:\\hpc\\DE.dwg"))       (command "_.-insert" fname "_S" 1.4 "_R" 0.0 "_non" '(7.6911 3.3174) "" 0 AV)   ));dee
     
     
     
     
    回复

    使用道具 举报

    114

    主题

    1万

    帖子

    1万

    银币

    中流砥柱

    Rank: 25

    铜币
    543
    发表于 2022-7-5 18:01:16 | 显示全部楼层
     
    If you are changing ATTREQ to 0, you should not supply the attribute value:
    1. (defun c:dee ( / fname )   (mapcar 'setvar '("cmdecho" "insunits" "dimasz") '(0 4 3.0))   (if (findfile (setq fname "c:\\hpc\\DE.dwg"))        (command "_.-insert" fname "_S" 1.4 "_R" 0.0 "_non" '(7.6911 3.3174))   ))
    You also no longer require the ENTER & rotation responses, as these have already been supplied ("_S" 1.4 and "_R" 0.0).
     
    Please take some time to study the comments in my posts, and also manually enter the prompts for the -INSERT command at the command-line so that you are aware of how your program works.
     
    I see that you have also changed the function definition to 'c:dee', therefore, it will need to be evaluated as such:
    1. _.open *file* (load "DEE.lsp" nil) (if c:DEE (c:DEE)) _.qsave _.close
    回复

    使用道具 举报

    发表回复

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

    本版积分规则

    • 微信公众平台

    • 扫描访问手机版

    • 点击图片下载手机App

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

    GMT+8, 2025-3-13 08:39 , Processed in 0.480956 second(s), 70 queries .

    © 2020-2025 乐筑天下

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