明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 813|回复: 1

[源码] Layer Director

  [复制链接]
发表于 2016-5-12 16:47 | 显示全部楼层 |阅读模式

Function SyntaxLDON / LDOFF
Current Version1.6
Program Description
This program uses a Visual LISP Command Reactor to automatically set the current layer when a command is called, proceeding to reset to the previous current layer when the command is completed. The target layer will also be created if it does not already exist in the drawing.
The data controlling the layer to be set when certain commands are called is tabulated at the top of the code - this may be altered and expanded to suit the user's requirements.
At The First Item of the each List in at The the Table IS at The name of A Standard the AutoCAD Command or Custom the AutoLISP Command to Trigger A Layer Change. This Command name SHOULD BE at The Full Command name, Not A Command Alias. At The Command IS Not Case-sensitive and may use wildcards.  
A FEW examples give the To, "[the DM] the TEXT, the TEXT" Will CUE A Layer at The Change for the Text, MText DText and Commands; "* LEADER" Will CUE A Layer at The Leader for Change, QLeader and MLeader Commands.   
The second item is the name of the layer to be set to current when the command is called. This layer will be created if not present in the active drawing. The remaining items are basic layer properties to be applied to layers that are created by the program - the required format for these properties is described in more detail in the program source code.
A 'Force Layer Properties' parameter set in the code determines whether the program will automatically modify the properties of existing layers in the drawing. If enabled, the properties of existing layers will be modified to match those found in the Layer Data described above.
The program also offers an xref-dependent layer assignment option, which will automatically insert external references on a layer matching the xref name, with an optional prefix & suffix, and predefined layer properties which may be configured from the program source code.
Finally, the program also enables the user to automatically configure any number of system variables when a command is invoked, with the system variables reset to their original values upon completing or cancelling the active command.
The enable at The Program Will Automatically at The the Command ON Drawing loaded the when the Reactor Startup, and at The Current Layer Will BE Automatically changed the any of the when Commands are listed at The Called. May the Reactor BE subsequently at The Disabled Enabled Manually or a using at The Commands LDOFF & LDON respectively.   
Example of Usage
[Attach] 93043 [/ attach]


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2016-5-12 18:03 | 显示全部楼层
这老外只会贴LeeMac的程序, LeeMac是非常讨厌这种行为的, 一是贴子中没有引用出处,没有写作者名, 二是,他希望别人只是贴出处地址,而不是下载后在其它站点发布.

点评

YES SIR SHARING THE KNOWLEDGE  发表于 2016-5-12 18:18
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-27 10:27 , Processed in 0.307512 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表