LspCAD最牛B教程
- 格式:pdf
- 大小:884.70 KB
- 文档页数:30
CAD软件内LSP
文件加载使用方法
1、LSP文件编写的外挂程序的命令说明
用记事本打开lsp格式文件你会发现程序里面都会有“Defun C:XXX()”,其中“XXX”就是执行该外挂程序时要输入的命令,后面括号里面也有可能不是空的,不过不影响操作
2、加载流程
CAD画图过程中很多时候会用到一些外部插件,比如统计线段总长度的插件,此处以zz.lsp为例说明。
通常我们使用的时候,一般是这样的流程:
工具—加载应用程序—找到应用程序—加载—确定。
这种方法的缺点是,每次打开软件,用的时候都需要加载一次。
那么有两种方法可以让软件打开的时候自动加载,直接输入插件名称,直接调用即可。
一种是启动组方法,还有一种比启动组更直接好用,你一定不知道!
第 1 页共2 页
步骤:工具——加载应用程序——启动组—关闭。
关闭软件,再次打开软件的时候会
蹦出来一个窗口就是刚刚加入启动组的插件,点加载。
命令行输入zz
,即可直接调用。
注意:打开软件跳出来的加载窗口,一定要点加载,否则之后都会被否定。
不能做到直接调用。
第 2 页共2 页。
精通CAD的10个技巧:从入门到高级CAD(计算机辅助设计)软件是现代工程设计中不可或缺的工具之一。
它可以帮助工程师和设计师以更高效和精确的方式创建图纸和模型。
无论您是初学者还是有一定经验的CAD用户,下面是10个精通CAD的技巧,帮助您从入门到高级的使用。
1. 控制视图:熟悉CAD软件中的视图控制功能是非常重要的。
学会使用缩放、平移和旋转等操作来调整和查看图纸或模型,可以提高您的工作效率。
快捷键和鼠标操作是掌握这些技巧的关键。
2. 利用层:将图形元素组织到不同的层中可以更好地管理和控制绘图。
合理设置和使用层,可以简化图纸的修改和管理过程。
确保为每个图层分配适当的颜色和线型,以便更清晰地看到图形。
3. 使用块:块是重复使用的图形元素,如标准符号、常见图标等。
将这些元素定义为块,并在需要时插入,可以大幅简化绘图过程。
了解块编辑和属性定义等相关工具,将帮助您更高效地使用块。
4. 学会使用快捷键:熟悉并使用CAD软件中的快捷键将极大地提升您的绘图速度。
通过学习和记忆常用操作的快捷键,您不再需要频繁切换到菜单栏或工具栏,大大提高了工作流程的连续性。
5. 制图标准:CAD软件使用的是标准的图形符号和尺寸约定。
了解并应用所使用的制图标准,如ISO标准或ASME标准,可以确保您的绘图和设计在全球范围内都能被正确理解和使用。
6. 设备和模板:配置好适用于您所从事领域的设备和模板是一项重要任务。
根据需要设置图纸的比例、尺寸和单位,以及自定义缺省图层和图形样式等。
将您经常使用的设置保存为模板,将极大地减少创建新图纸时的时间和工作量。
7. 使用 CAD 工具组:CAD软件通常提供许多强大的设计工具和功能。
学会使用绘制线段、多边形、圆弧等基本工具,以及构建复杂曲线和曲面的高级工具,这将增强您的设计能力。
8. 尺寸和注释:尺寸和注释是绘图中必不可少的部分。
确保准确、规范和清晰地标注尺寸和注释,以便其他人能理解您的设计意图。
超经典CAD lisp程序集锦如果您使用 AutoCAD,下面的内容对您一定有帮助。
在某些方面能大大提高您的工作效率。
下面的程序均以源程序方式给出,您可以使用、参考、修改它。
bg.lsp --- 表格自动生成asc.lsp --- 将文本文件内容写入图中,字符是单个的wf.lsp --- 将图中字符写入磁盘exstr.lsp --- 将字符串分解成单字pgtxt.lsp --- 将字符合成字符串pb.lsp --- 通过给出长度将字符串分成两个串cht.lsp --- 直接修改文字内容或块属性ct.lsp --- 对数字串进行加减chh.lsp --- 直接修改文字高度chhw.lsp --- 直接修改文字高宽比(针对PKPM软件将字符定位点改为左下角) chst.lsp --- 直接修改文字字体txt.shx --- 修改后的标准txt.shx文件。
(kuozhan.sld为增强的内容幻灯片)tiao.lsp --- 配合修改过的标准字体文件,将中文字符调大tiao1.lsp --- 配合修改过的标准字体文件,将英文字符调小untiao.lsp --- 上两个程序的复原sht.lsp --- 在图中查找字符串zhuang.lsp --- 桩点及钎探号绘制(勘测图)dim.lsp --- 配合JT.DWG将尺寸标注调成适合建筑结构设计(1:1)dimm.lsp --- 配合JT.DWG将尺寸标注调成适合建筑结构设计(1:100)di1.lsp~di8.lsp --- 直接连续标注尺寸(用于1:1的图)di100.lsp~di800.lsp --- 直接连续标注尺寸(用于1:100的图)详细内容及附件下载请浏览北纬服务论坛/thread-2724-1-1.htmlCAD快捷键大全F1: 获取帮助F2: 实现作图窗和文本窗口的切换F3: 控制是否实现对象自动捕捉F4: 数字化仪控制F5: 等轴测平面切换F6: 控制状态行上坐标的显示方式F7: 栅格显示模式控制F8: 正交模式控制F9: 栅格捕捉模式控制F10: 极轴模式控制F11: 对象追踪式控制Ctrl+B: 栅格捕捉模式控制(F9)刚刚看了一下dra:半径标注ddi:直径标注dal:对齐标注dan:角度标注Ctrl+C: 将选择的对象复制到剪切板上Ctrl+F: 控制是否实现对象自动捕捉(f3) Ctrl+G: 栅格显示模式控制(F7)Ctrl+J: 重复执行上一步命令Ctrl+K: 超级链接Ctrl+N: 新建图形文件Ctrl+M: 打开选项对话框AA: 测量区域和周长(area)AL: 对齐(align)AR: 阵列(array)AP: 加载*lsp程系AV: 打开视图对话框(dsviewer) SE: 打开对相自动捕捉对话框ST: 打开字体设置对话框(style) SO: 绘制二围面( 2d solid) SP: 拼音的校核(spell)SC: 缩放比例 (scale)SN: 栅格捕捉模式设置(snap) DT: 文本的设置(dtext)DI: 测量两点间的距离OI:插入外部对相Ctrl+1: 打开特性对话框Ctrl+2: 打开图象资源管理器Ctrl+6: 打开图象数据原子Ctrl+O: 打开图象文件Ctrl+P: 打开打印对说框Ctrl+S: 保存文件Ctrl+U: 极轴模式控制(F10)Ctrl+v: 粘贴剪贴板上的内容Ctrl+W: 对象追踪式控制(F11) Ctrl+X: 剪切所选择的内容Ctrl+Y: 重做Ctrl+Z: 取消前一步的操作A: 绘圆弧B: 定义块C: 画圆D: 尺寸资源管理器E: 删除F: 倒圆角G: 对相组合H: 填充I: 插入S: 拉伸T: 文本输入W: 定义块并保存到硬盘中L: 直线M: 移动X: 炸开V: 设置当前坐标U: 恢复上一次操做O: 偏移P: 移动Z: 缩放显示降级适配(开关)【O】适应透视图格点【Shift】+【Ctrl】+【A】排列【Alt】+【A】角度捕捉(开关) 【A】动画模式 (开关) 【N】改变到后视图【K】背景锁定(开关) 【Alt】+【Ctrl】+【B】前一时间单位【.】下一时间单位【,】改变到上(Top)视图【T】改变到底(Bottom)视图【B】改变到相机(Camera)视图【C】改变到前(Front)视图【F】改变到等大的用户(User)视图【U】改变到右(Right)视图【R】改变到透视(Perspective)图【P】循环改变选择方式【Ctrl】+【F】默认灯光(开关) 【Ctrl】+【L】删除物体【DEL】当前视图暂时失效【D】是否显示几何体内框(开关) 【Ctrl】+【E】显示第一个工具条【Alt】+【1】专家模式�全屏(开关) 【Ctrl】+【X】暂存(Hold)场景【Alt】+【Ctrl】+【H】取回(Fetch)场景【Alt】+【Ctrl】+【F】冻结所选物体【6】跳到最后一帧【END】跳到第一帧【HOME】显示/隐藏相机(Cameras)【Shift】+【C】显示/隐藏几何体(Geometry) 【Shift】+【O】显示/隐藏网格(Grids) 【G】显示/隐藏帮助(Helpers)物体【Shift】+【H】显示/隐藏光源(Lights) 【Shift】+【L】显示/隐藏粒子系统(Particle Systems) 【Shift】+【P】显示/隐藏空间扭曲(Space Warps)物体【Shift】+【W】锁定用户界面(开关) 【Alt】+【0】匹配到相机(Camera)视图【Ctrl】+【C】材质(Material)编辑器【M】最大化当前视图 (开关) 【W】脚本编辑器【F11】新的场景【Ctrl】+【N】法线(Normal)对齐【Alt】+【N】向下轻推网格小键盘【-】向上轻推网格小键盘【+】NURBS表面显示方式【Alt】+【L】或【Ctrl】+【4】NURBS调整方格1 【Ctrl】+【1】NURBS调整方格2 【Ctrl】+【2】NURBS调整方格3 【Ctrl】+【3】偏移捕捉【Alt】+【Ctrl】+【空格】打开一个MAX文件【Ctrl】+【O】平移视图【Ctrl】+【P】交互式平移视图【I】放置高光(Highlight) 【Ctrl】+【H】播放/停止动画【/】快速(Quick)渲染【Shift】+【Q】回到上一场景*作【Ctrl】+【A】回到上一视图*作【Shift】+【A】撤消场景*作【Ctrl】+【Z】撤消视图*作【Shift】+【Z】刷新所有视图【1】用前一次的参数进行渲染【Shift】+【E】或【F9】渲染配置【Shift】+【R】或【F10】在xy/yz/zx锁定中循环改变【F8】约束到X轴【F5】约束到Y轴【F6】约束到Z轴【F7】旋转(Rotate)视图模式【Ctrl】+【R】或【V】保存(Save)文件【Ctrl】+【S】透明显示所选物体(开关) 【Alt】+【X】选择父物体【PageUp】选择子物体【PageDown】根据名称选择物体【H】选择锁定(开关) 【空格】减淡所选物体的面(开关) 【F2】显示所有视图网格(Grids)(开关) 【Shift】+【G】显示/隐藏命令面板【3】显示/隐藏浮动工具条【4】显示最后一次渲染的图画【Ctrl】+【I】显示/隐藏主要工具栏【Alt】+【6】显示/隐藏安全框【Shift】+【F】*显示/隐藏所选物体的支架【J】显示/隐藏工具条【Y】/【2】百分比(Percent)捕捉(开关) 【Shift】+【Ctrl】+【P】打开/关闭捕捉(Snap) 【S】循环通过捕捉点【Alt】+【空格】声音(开关) 【\】间隔放置物体【Shift】+【I】改变到光线视图【Shift】+【4】循环改变子物体层级【Ins】子物体选择(开关) 【Ctrl】+【B】帖图材质(Texture)修正【Ctrl】+【T】加大动态坐标【+】减小动态坐标【-】激活动态坐标(开关) 【X】精确输入转变量【F12】全部解冻【7】根据名字显示隐藏的物体【5】刷新背景图像(Background) 【Alt】+【Shift】+【Ctrl】+【B】显示几何体外框(开关) 【F4】视图背景(Background) 【Alt】+【B】用方框(Box)快显几何体(开关) 【Shift】+【B】打开虚拟现实数字键盘【1】虚拟视图向下移动数字键盘【2】虚拟视图向左移动数字键盘【4】虚拟视图向右移动数字键盘【6】虚拟视图向中移动数字键盘【8】虚拟视图放大数字键盘【7】虚拟视图缩小数字键盘【9】实色显示场景中的几何体(开关) 【F3】全部视图显示所有物体【Shift】+【Ctrl】+【Z】*视窗缩放到选择物体范围(Extents)【E】缩放范围【Alt】+【Ctrl】+【Z】视窗放大两倍【Shift】+数字键盘【+】放大镜工具【Z】视窗缩小两倍【Shift】+数字键盘【-】根据框选进行放大【Ctrl】+【w】视窗交互式放大【[】视窗交互式缩小【]】轨迹视图加入(Add)关键帧【A】前一时间单位【<】下一时间单位【>】编辑(Edit)关键帧模式【E】编辑区域模式【F3】编辑时间模式【F2】展开对象(Object)切换【O】展开轨迹(Track)切换【T】函数(Function)曲线模式【F5】或【F】锁定所选物体【空格】向上移动高亮显示【↓】向下移动高亮显示【↑】向左轻移关键帧【←】向右轻移关键帧【→】位置区域模式【F4】回到上一场景*作【Ctrl】+【A】撤消场景*作【Ctrl】+【Z】用前一次的配置进行渲染【F9】渲染配置【F10】向下收拢【Ctrl】+【↓】向上收拢【Ctrl】+【↑】材质编辑器用前一次的配置进行渲染【F9】渲染配置【F10】撤消场景*作【Ctrl】+【Z】示意(Schematic)视图下一时间单位【>】前一时间单位【<】回到上一场景*作【Ctrl】+【A】撤消场景*作【Ctrl】+【Z】Active Shade绘制(Draw)区域【D】渲染(Render) 【R】锁定工具栏(泊坞窗) 【空格】视频编辑加入过滤器(Filter)项目【Ctrl】+【F】加入输入(Input)项目【Ctrl】+【I】加入图层(Layer)项目【Ctrl】+【L】加入输出(Output)项目【Ctrl】+【O】加入(Add)新的项目【Ctrl】+【A】加入场景(Scene)事件【Ctrl】+【s】编辑(Edit)当前事件【Ctrl】+【E】执行(Run)序列【Ctrl】+【R】新(New)的序列【Ctrl】+【N】撤消场景*作【Ctrl】+【Z】NURBS编辑CV 约束法线(Normal)移动【Alt】+【N】CV 约束到U向移动【Alt】+【U】CV 约束到V向移动【Alt】+【V】显示曲线(Curves) 【Shift】+【Ctrl】+【C】显示控制点(Dependents) 【Ctrl】+【D】显示格子(Lattices) 【Ctrl】+【L】NURBS面显示方式切换【Alt】+【L】显示表面(Surfaces) 【Shift】+【Ctrl】+【s】显示工具箱(Toolbox) 【Ctrl】+【T】显示表面整齐(Trims) 【Shift】+【Ctrl】+【T】根据名字选择本物体的子层级【Ctrl】+【H】锁定2D 所选物体【空格】选择U向的下一点【Ctrl】+【→】选择V向的下一点【Ctrl】+【↑】选择U向的前一点【Ctrl】+【←】选择V向的前一点【Ctrl】+【↓】根据名字选择子物体【H】柔软所选物体【Ctrl】+【s】转换到Curve CV 层级【Alt】+【Shift】+【Z】转换到Curve 层级【Alt】+【Shift】+【C】转换到Imports 层级【Alt】+【Shift】+【I】转换到Point 层级【Alt】+【Shift】+【P】转换到Surface CV 层级【Alt】+【Shift】+【V】转换到Surface 层级【Alt】+【Shift】+【S】转换到上一层级【Alt】+【Shift】+【T】转换降级【Ctrl】+【X】FFD转换到控制点(Control Point)层级【Alt】+【Shift】+【C】到格点(Lattice)层级【Alt】+【Shift】+【L】到设置体积(Volume)层级【Alt】+【Shift】+【S】转换到上层级【Alt】+【Shift】+【T】打开的UVW贴图进入编辑(Edit)UVW模式【Ctrl】+【E】调用*.uvw文件【Alt】+【Shift】+【Ctrl】+【L】保存UVW为*.uvw格式的文件【Alt】+【Shift】+【Ctrl】+【S】打断(Break)选择点【Ctrl】+【B】分离(Detach)边界点【Ctrl】+【D】过滤选择面【Ctrl】+【空格】水平翻转【Alt】+【Shift】+【Ctrl】+【B】垂直(Vertical)翻转【Alt】+【Shift】+【Ctrl】+【V】冻结(Freeze)所选材质点【Ctrl】+【F】隐藏(Hide)所选材质点【Ctrl】+【H】全部解冻(unFreeze) 【Alt】+【F】全部取消隐藏(unHide) 【Alt】+【H】从堆栈中获取面选集【Alt】+【Shift】+【Ctrl】+【F】从面获取选集【Alt】+【Shift】+【Ctrl】+【V】锁定所选顶点【空格】水平镜象【Alt】+【Shift】+【Ctrl】+【N】垂直镜象【Alt】+【Shift】+【Ctrl】+【M】水平移动【Alt】+【Shift】+【Ctrl】+【J】垂直移动【Alt】+【Shift】+【Ctrl】+【K】平移视图【Ctrl】+【P】象素捕捉【S】平面贴图面/重设UVW 【Alt】+【Shift】+【Ctrl】+【R】水平缩放【Alt】+【Shift】+【Ctrl】+【I】垂直缩放【Alt】+【Shift】+【Ctrl】+【O】移动材质点【Q】旋转材质点【W】等比例缩放材质点【E】焊接(Weld)所选的材质点【Alt】+【Ctrl】+【W】焊接(Weld)到目标材质点【Ctrl】+【W】Unwrap的选项(Options) 【Ctrl】+【O】更新贴图(Map) 【Alt】+【Shift】+【Ctrl】+【M】将Unwrap视图扩展到全部显示【Alt】+【Ctrl】+【Z】框选放大Unwrap视图【Ctrl】+【Z】将Unwrap视图扩展到所选材质点的大小【Alt】+【Shift】+【Ctrl】+【Z】缩放到Gizmo大小【Shift】+【空格】缩放(Zoom)工具【Z】反应堆(Reactor)建立(Create)反应(Reaction) 【Alt】+【Ctrl】+【C】删除(Delete)反应(Reaction) 【Alt】+【Ctrl】+【D】编辑状态(State)切换【Alt】+【Ctrl】+【s】设置最大影响(Influence) 【Ctrl】+【I】设置最小影响(Influence) 【Alt】+【I】设置影响值(Value) 【Alt】+【Ctrl】+【V】ActiveShade (Scanline)初始化【P】更新【U】宏编辑器累积计数器【Q】[color=#800080]AutoCAD快捷键快捷键执行命令命令说明3A 3DARRAY 三维阵列3DO 3DORBIT 三维动态观察器3F 3DFACE 三维表面3P 3DPOLY 三维多义线A ARC 圆弧ADC ADCENTER AutoCAD设计设计中心AA AREA 面积AL ALIGN 对齐(适用于二维和三维)AP APPLOAD 加载、卸载应用程序AR ARRAY 阵列*AR *ARRAY 命令式阵列ATT ATTDEF 块的属性*ATT *ATTDEF 命令式块的属性ATE ATTEDIT 编辑属性ATE *ATTEDIT 命令式编辑属性ATTE *ATTEDIT 命令式编辑属性B BLOCK 对话框式图块建立*B *BLOCK 命令式图块建立BH BHATCH 对话框式绘制图案填充BO BOUNDARY 对话框式封闭边界建立*BO *BOUNDARY 命令式封闭边界建立BR BREAK 打断C CIRCLE 圆CHA PROPERTIES 对话框式对象特情修改*CH CHANGE 命令式特性修改CHA CHAMFER 倒角COL COLCR 对话框式颜色设定COLOUR COLCR 对话框式颜色设定CO COPY 复制D DIMSTYLE 尺寸样式设定DAL DIMALIGNED 对齐式线性标注DAN DIMANGULAR 角度标注DBA DIMBASELINE 基线式标注DBC DBCONNECT 提供到外部数据库表的接口DCE DIMCENTER 圆心标记DCO DIMCONTINUE 连续式标注DDA DIMDISASSOCIATE 标注不关联DDI DIMDIAMETER 直径标注DED DIMEDIT 尺寸修改DI DIST 测量两点间距离DIV DIVIDE 等分布点DLI DIMLINEAR 线性标注DO DONUT 双圆DOR DIMORDIMATE 坐标式标注DOV DIMOVERRIDE 更新标注变量DR DRAWORDER 显示顺序DRA DIMRADIUS 半径标注DRE DIMREASSOCIATE 标注关联DS DSETTINGS 捕捉设定DST DIMSTYLE 尺寸样式设定DT DTEXT 写入文字DV DVIEW 定义平行投影或透视投影视图E ERASE 删除对象ED DDEDIT 单行文字修改EL ELLIPSE 椭圆EX EXTEND 延伸EXIT QUIT 退出EXP EXPORT 输出文件EXT EXTRUDE 将二维对象拉伸为三、维维实体F FILLET 倒圆角FI FILTER 过滤器G GROUP 对话框式选择集设定*G *GROUP 命令式选择集设定GR DDGRIPS 夹点控制设定H BHATCH 对话框式绘制图案填充*H HATCH 命令式绘制图案填充HE HATCHEDIT 编辑图案填充HI HIDE 消隐I INSERT 对话框式插入图块*I *INSERT 命令式插入图块IAD IMAGEADJUST 图像调整IAT IMAGEATTACH 并入图像ICL IMAGECLIP 截取图像IM IMAGE 对话框式附着图像*IM *IMAGE 命令式贴附图像IMP IMPORT 输入文件IN INTERSECT 将相交实体或面域部分创建INF IMTERFERE 由共同部分创建三维实体IO INSERTOBJ 插入对象L LINE 画线LA LAYER 对话框式图层控制*LA *LAYER 命令式图层控制LE QLEADER 引导线标注LRN LENGTHEN 长度LI LIST 查询对象文件LINEWEIGHT LWEIGHT 线宽LO *LAYOUT 配置设定LS LIST 查询对象文件LT LINETYPE 对话框式线型加载*LT *LINETYPE 命令式线型加载LTYPE LINETYPE 对话框式线型加载*LTYPE *LINETYPE 命令式线型加载LTS LTSCALE 设置线型比例因子LW LWEIGHT 线宽设定M MOVE 搬移对象MA MATCHPROP 对象特性复制ME MEASURE 量测等距布点MI MIRROR 镜像对象ML MLINE 绘制多线MO PROPERTIES 对象特性修改MS MSPACE 从图纸空间转换支模型空间MT MTEXT 多行文字写入MV MVIEW 浮动视口O OFFSET 偏移复制OP POPTIONS 选项ORBIT 3DORBIT 三维动态观察器OS OSNAP 对话框式对象捕捉设定*OS *OSNAP 命令式对象捕捉设定P PAN 即时平移*P *PAN 两点式平移控制PA PASTESPEC 选择性粘贴PARTIALOPEN *PASTESPEC 将指定的对象加载对新图形中PE PEDIT 编辑多义线PL PLINE 绘制多义线PO POINT 绘制点POL POLYGON 绘制正多边型PR OPTIONS 选项PRCLOSE PROPERTIESCLOSE 关闭对象特性修改对话框PROPS PROPERTIES 对象特性修改PRE PREVIEW 输出预览PRINT PLOT 打印输出PS PSPACE 图线空间PTW PUBLISHTIWEB 发送支网页PU PURGE 肃清无用对象*PU *PURGE 命令式肃清无用对象R REDRAW 重绘RA REDRAWALL 所有视口重绘RE REGEN 重新生成REA REGENALL 所有视口重新生成REC RECTANGLE 绘制矩形REG REGION 三维面域REN REBAME 对话框式重命名*REN *REBAME 命令式重命名REV REVOLVE 利用绕轴旋转二维对象创建三维体RM DDRMODES 打印辅助设定RO ROTATE 旋转RPR RPREF 设置渲染参考RR RENDER 渲染S STRETCH 拉伸SC SCALE 比例缩放SCR SCRIPT 调入剧本文件SE DSETTINGS 捕捉设定SEC DECTION 通过使平面与实体相交创建面域SET SETVAR 设定变量值SHA SHADE 着色SL SLICE 用平面剖切实体SN SNAP 捕捉控制SO SOLID 填实的三边形或四边形SP SEELL 拼字SPL SPLINE 样条曲线SPE SPLINEDIT 编辑样条曲线ST STYLE 字型设定SU SUBTRACT 差集运算T MTEXT 对话框式多行文字写入*T *MTEXT 命令式多行文字写入TA TABLET 数字化仪规划TH THICKNESS 厚度TI TILEMODE 图线空间和模型空间设定切换TO TOOLBAR 工具栏设定TOL TOLERANCE 公差符号标注TOR TORUS 圆环TR TRIM 修剪UC DDUCS 用户坐标系UCP DDUCSP 设置正交窗口UN UNITS 对话框式单位设定*UN *UNITS 命令式单位设定UNI UNION 并集运算V VIEW 对话框式视图控制*V *VIEW 视图控制VP DDVPOPINT 视点*VP WPOINT 命令式视点W WBLOCK 对话框式图块写出*W *WBLOCK 命令式图块写出WE WEDGE 三维楔体X EXPLODE 分解XA XATTACH 贴附外部参考XB XBIND 并入外部参考*XB *XBIND 命令式并入外部参考XC XCLIP 截取外部参考XL XLINE 构造线XR XREF 对话框式外部参考控制*XR *XREF 命令式外部参考控制Z ZOOM 视口缩入控制CTRL+A 编组CTRL+B 捕捉CTRL+C 复制CTRL+D 坐标CTRL+E 等轴测平面CTRL+F 对象捕捉CTRL+G 删格CTRL+J CTRL+SHIFT+S 图形另存为CTRL+K 超级链接LCTRL+L 正交CTRL+M 帮助CTRL+N 新建CTRL+O 打开CTRL+P 打印CTRL+Q 退出CTRL+S 保存CTRL+T 数字化仪CTRL+U CTRL+F10 极轴CTRL+V 粘贴CTRL+W 对象跟踪CTRL+X 剪切CTRL+z 退回CTRL+1 对象特性CTRL+2 CAD设计中心CTRL+6 数据源CTRL+F6 切换当前窗口CTRL+F8 运行部件CTRL+SHIFT+C 带基点复制快捷键执行命令命令说明3A 3DARRAY 三维阵列3DO 3DORBIT 三维动态观察器3F 3DFACE 三维表面3P 3DPOLY 三维多义线A ARC 圆弧ADC ADCENTER AutoCAD设计设计中心AA AREA 面积AL ALIGN 对齐(适用于二维和三维)AP APPLOAD 加载、卸载应用程序AR ARRAY 阵列*AR *ARRAY 命令式阵列ATT ATTDEF 块的属性*ATT *ATTDEF 命令式块的属性ATE ATTEDIT 编辑属性ATE *ATTEDIT 命令式编辑属性ATTE *ATTEDIT 命令式编辑属性B BLOCK 对话框式图块建立*B *BLOCK 命令式图块建立BH BHATCH 对话框式绘制图案填充BO BOUNDARY 对话框式封闭边界建立*BO *BOUNDARY 命令式封闭边界建立BR BREAK 打断C CIRCLE 圆CHA PROPERTIES 对话框式对象特情修改*CH CHANGE 命令式特性修改CHA CHAMFER 倒角COL COLCR 对话框式颜色设定COLOUR COLCR 对话框式颜色设定CO COPY 复制D DIMSTYLE 尺寸样式设定DAL DIMALIGNED 对齐式线性标注DAN DIMANGULAR 角度标注DBA DIMBASELINE 基线式标注DBC DBCONNECT 提供到外部数据库表的接口DCE DIMCENTER 圆心标记DCO DIMCONTINUE 连续式标注DDA DIMDISASSOCIATE 标注不关联DDI DIMDIAMETER 直径标注DED DIMEDIT 尺寸修改DI DIST 测量两点间距离DIV DIVIDE 等分布点DLI DIMLINEAR 线性标注DO DONUT 双圆DOR DIMORDIMATE 坐标式标注DOV DIMOVERRIDE 更新标注变量DR DRAWORDER 显示顺序DRA DIMRADIUS 半径标注DRE DIMREASSOCIATE 标注关联DS DSETTINGS 捕捉设定DST DIMSTYLE 尺寸样式设定DT DTEXT 写入文字DV DVIEW 定义平行投影或透视投影视图E ERASE 删除对象ED DDEDIT 单行文字修改EL ELLIPSE 椭圆EX EXTEND 延伸EXIT QUIT 退出EXP EXPORT 输出文件EXT EXTRUDE 将二维对象拉伸为三、维F FILLET 倒圆角FI FILTER 过滤器G GROUP 对话框式选择集设定*G *GROUP 命令式选择集设定GR DDGRIPS 夹点控制设定H BHATCH 对话框式绘制图案填充*H HATCH 命令式绘制图案填充HE HATCHEDIT 编辑图案填充HI HIDE 消隐I INSERT 对话框式插入图块*I *INSERT 命令式插入图块IAD IMAGEADJUST 图像调整IAT IMAGEATTACH 并入图像ICL IMAGECLIP 截取图像IM IMAGE 对话框式附着图像*IM *IMAGE 命令式贴附图像IMP IMPORT 输入文件IN INTERSECT 将相交实体或面域部分创建INF IMTERFERE 由共同部分创建三维实体IO INSERTOBJ 插入对象L LINE 画线LA LAYER 对话框式图层控制*LA *LAYER 命令式图层控制LE QLEADER 引导线标注LRN LENGTHEN 长度LI LIST 查询对象文件LINEWEIGHT LWEIGHT 线宽LO *LAYOUT 配置设定LS LIST 查询对象文件LT LINETYPE 对话框式线型加载*LT *LINETYPE 命令式线型加载LTYPE LINETYPE 对话框式线型加载*LTYPE *LINETYPE 命令式线型加载LTS LTSCALE 设置线型比例因子LW LWEIGHT 线宽设定M MOVE 搬移对象MA MATCHPROP 对象特性复制ME MEASURE 量测等距布点MI MIRROR 镜像对象ML MLINE 绘制多线MO PROPERTIES 对象特性修改MS MSPACE 从图纸空间转换支模型空间MT MTEXT 多行文字写入MV MVIEW 浮动视口O OFFSET 偏移复制OP POPTIONS 选项ORBIT 3DORBIT 三维动态观察器OS OSNAP 对话框式对象捕捉设定*OS *OSNAP 命令式对象捕捉设定P PAN 即时平移*P *PAN 两点式平移控制PA PASTESPEC 选择性粘贴PARTIALOPEN *PASTESPEC 将指定的对象加载对新图形中PE PEDIT 编辑多义线PL PLINE 绘制多义线PO POINT 绘制点POL POLYGON 绘制正多边型PR OPTIONS 选项PRCLOSE PROPERTIESCLOSE 关闭对象特性修改对话框PROPS PROPERTIES 对象特性修改PRE PREVIEW 输出预览PRINT PLOT 打印输出PS PSPACE 图线空间PTW PUBLISHTIWEB 发送支网页PU PURGE 肃清无用对象*PU *PURGE 命令式肃清无用对象R REDRAW 重绘RA REDRAWALL 所有视口重绘RE REGEN 重新生成REA REGENALL 所有视口重新生成REC RECTANGLE 绘制矩形REG REGION 三维面域REN REBAME 对话框式重命名*REN *REBAME 命令式重命名REV REVOLVE 利用绕轴旋转二维对象创建三维体RM DDRMODES 打印辅助设定RO ROTATE 旋转RPR RPREF 设置渲染参考RR RENDER 渲染S STRETCH 拉伸SC SCALE 比例缩放SCR SCRIPT 调入剧本文件SE DSETTINGS 捕捉设定SEC DECTION 通过使平面与实体相交创建面域SET SETVAR 设定变量值SHA SHADE 着色SL SLICE 用平面剖切实体SN SNAP 捕捉控制SO SOLID 填实的三边形或四边形SP SEELL 拼字SPL SPLINE 样条曲线SPE SPLINEDIT 编辑样条曲线ST STYLE 字型设定SU SUBTRACT 差集运算T MTEXT 对话框式多行文字写入*T *MTEXT 命令式多行文字写入TA TABLET 数字化仪规划TH THICKNESS 厚度TI TILEMODE 图线空间和模型空间设定切换TO TOOLBAR 工具栏设定TOL TOLERANCE 公差符号标注TOR TORUS 圆环TR TRIM 修剪UC DDUCS 用户坐标系UCP DDUCSP 设置正交窗口UN UNITS 对话框式单位设定*UN *UNITS 命令式单位设定UNI UNION 并集运算V VIEW 对话框式视图控制*V *VIEW 视图控制VP DDVPOPINT 视点*VP WPOINT 命令式视点W WBLOCK 对话框式图块写出*W *WBLOCK 命令式图块写出WE WEDGE 三维楔体X EXPLODE 分解XA XATTACH 贴附外部参考XB XBIND 并入外部参考*XB *XBIND 命令式并入外部参考XC XCLIP 截取外部参考XL XLINE 构造线XR XREF 对话框式外部参考控制*XR *XREF 命令式外部参考控制Z ZOOM 视口缩入控制CTRL+A 编组CTRL+B 捕捉CTRL+C 复制CTRL+D 坐标CTRL+E 等轴测平面CTRL+F 对象捕捉CTRL+G 删格CTRL+J CTRL+SHIFT+S 图形另存为CTRL+K 超级链接LCTRL+L 正交CTRL+M 帮助CTRL+N 新建CTRL+O 打开CTRL+P 打印CTRL+Q 退出CTRL+S 保存CTRL+T 数字化仪CTRL+U CTRL+F10 极轴CTRL+V 粘贴CTRL+W 对象跟踪CTRL+X 剪切CTRL+z 退回CTRL+1 对象特性CTRL+2 CAD设计中心CTRL+6 数据源CTRL+F6 切换当前窗口CTRL+F8 运行部件CTRL+SHIFT+C c 带基点复制。
Lspcad安装说明
LpsCAD 5.20安装步骤:
安装前和使用前最好将其他全部在运行的程序关闭。
1、先解压HB_LspCAD525_SZL文件,HB_LspCAD525_SZL文件夹有4个文件,解压LspCAD原版文件。
2、在LspCAD原版文件夹内双击文件开始安装程序,完成后点击[Finish]程序完成安装。
3、回到HB_LspCAD525_SZL文件夹点击安装HB_LspCAD525_SZL汉化程序。
4、完成后在C盘C:\Program Files\LspCAD文件夹下双击文件,完成
后解压注册机文件。
先双击lspcad文件,然后进入注册机文件夹,双击KEYGEN文件,将注册码输入到空白处就可以使用了。
如果碰到问题,只要运行CKS.EXE这个文件,然后再运行一下SETUPEX.EXE 文件,接着试试运行LspCAD,就应该可以正常打开了,接着注册,就ok了。
实在装不上,拿U盘直接把安装好的文件COPY过来就可以了。
【特别提醒】:正常安装LpsCAD 5.20 商业标准版后,不要运行程序,首先直接安装汉化补丁,即成为LpsCAD 5.25 简体中文商业专业版。
如果你的操作系统是Windows NT、2K、XP,完成以上步骤后,在第一次运行前,请首先运行安装目录下的STEUPEX.EXE 文件,然后再注册、使用,否则在以上系统中将无法运行,必然卸载并清理注册表后,再重新按正确安装步骤安装后才能运行,切记!
其实关键就在这里,一旦安装出错,如何清理注册表在安装说明里没有详说。
如果安装后无法使用软件,可采用以下解决方法:卸载时采用360安全卫士里面的软件管家进行卸载,这样卸载后再重新按要求进行安装就可以了。
用LspCAD进行分频器辅助设计本文介绍利用LspCAD5.25版进行音箱分频器辅助设计的过程,主要以2路高级无源滤波器为例进行说明,并简单介绍2路简易无源滤波器的使用。
一、测试数据进行分频器设计需要用到的数据分别是低音单元和高音单元的频率响应曲线以及阻抗曲线,这些数据都可以用LspCAD自带的JustLMS软件进行测量。
在频率响应测量时需要注意:1、话筒应放在高低音单元的正中(或按实际听音位置确定话筒高度);2、测试距离60-100cm;3、高低音单元采用相同的补偿距离(Offset)。
测试好以后,将数据“导出”为txt文件供LspCAD使用。
测试数据:测试数据.rar (19.31 KB)下面是低音单元的频率响应曲线和阻抗曲线,单元已装箱并加了Zobel补偿网络。
Zobel 补偿网络是并联在单元上的RC串联电路,可以补偿因音圈电感而造成的高频段阻抗上升,图中可以看出补偿效果是比较理想的。
因为这两个元件的作用已在测试数据中体现,因此在后面的分频器设计中不再考虑这个网络的影响。
下面是高音单元的频率响应曲线和阻抗曲线。
二、2路高级无源滤波器新建一个2路高级无源滤波器,选并联结构。
主菜单上选“扬声器-网络1”,对应的是低音单元的数据。
在弹出的窗口中输入Re、Le和有效振动半径(用于计算指向性等指标,不输入也可)。
然后选择SPL数据文件和阻抗数据文件(就是用JustLMS测试后导出的频率响应文件和阻抗文件)。
同样输入“扬声器网络2”即高音单元的相关数据。
主菜单上选“分频网络-网络1”,对应的是低音单元的低通滤波线路。
在弹出的窗口中点击“示意图”按钮(或从主菜单上选择“窗口”-“图表/纵览”),可以看到“图表/纵览”窗口中显示出了分频电路结构。
在这个电路中,可以添加若干组和扬声器单元串联或并联的元件(串联还是并联可以选择,缺省是按串联-并联-串联-并联…的顺序排列),每组元件可以是单一的R、L或C,也可以是R、L、C的串并联组合。
CAD绘图中的常用命令与操作解析
CAD(计算机辅助设计)是现代工程设计领域必不可少的工具,熟练掌握CAD绘图中的常用命令和操作对于提高设计效率至关重要。
下面将介绍一些在CAD绘图中常用的命令和操作方式。
常用命令解析
1.线段命令
LINE命令是CAD中最基本的绘图命令之一,用于绘制直线。
通过指定起点和终点坐标,可以快速绘制直线。
2.圆弧命令
ARC命令用于绘制圆弧,指定起点、终点和半径等参数即可绘制所需的圆弧。
3.矩形命令
RECTANGLE命令可以绘制矩形,通过指定对角线端点或中心点、长度和宽度等参数绘制矩形。
4.多段线命令
PLINE命令用于绘制多段线,可以绘制具有多个节点的复杂图形。
常用操作解析
1.平移操作
MOVE命令用于将选定的对象沿指定方向移动到新位置,可通过指定基点和目标点完成平移操作。
2.复制操作
COPY命令可复制选定的对象到新位置,通过指定基点和目标点完成复制操作。
3.旋转操作
ROTATE命令用于按指定角度旋转选定对象,可选择旋转中心和旋转角度完成旋转操作。
4.缩放操作
SCALE命令可按比例缩放选定对象,通过指定基点和缩放比例完成缩放操作。
CAD绘图中的常用命令和操作是设计师们日常工作中必备的技能,熟练掌握这些命令和操作能够极大提高效率,精确绘制所需图形。
不断练习和探索各种命令的使用方法,结合实际设计需求,将帮助设计师们在CAD软件中游刃有余地完成各类设计任务。
通过不断学习和实践,可以逐步提升CAD设计水平,为工程设计工作带来更多的便利和效益。
AutoLisp入门教程本节通过一个简单的实例来讲述LISP程序的创建过程,介绍编制LISP程序的一些基本步骤,以及LISP程序在AutoCAD中的加载和运行的方法。
首先来创建一个最简单的LISP程序—-“Hello.lsp”,在AutoCAD 2002中加载并运行该程序,将会在命令行出现-“Hello, Visual LISP!”。
36.2.1 Visual LISP与AutoCAD的通信用户可以直接在AutoCAD命令行中键入AutoLISP表达式。
AutoCAD通过括号来确认AutoLISP表达式。
AutoCAD每当发现一个左括号,就确认为AutoLISP表达式,并由AutoLISP求表达式的值后返回AutoCAD,AutoCAD使用返回结果并继续进行其他工作。
注意在AutoLISP表达式中,左、右括号必须配对,否则AutoCAD将给出提示符n>,n表示右括号丢失数目。
此外,在AutoCAD中调用并执行AutoLISP程序。
在AutoLISP程序中采用COMMAND函数来与AutoCAD 命令程序处理器通信,COMMAND从AutoLISP获得命令并将其传给AutoCAD。
36.2.2 实例1 最简单的LISP程序——“Hello.lsp”Step 1 创建新文件(1) 运行AutoCAD 2002系统,以“acadiso.dwt”为样板创建图形文件,并调用“vlisp”命令进入Visual LISP环境。
(2) 单击“Standard(标准)”工具栏中的按钮,新建一个LISP文件。
Step 2 输入代码并保存文件(1) 在编辑窗口中输入源文件“Hello.lsp”的代码,如图36-3所示。
程序清单如下:;;;* Hello.lsp – Visual LISP文件实例(prompt "Pick point:") ;指定运行时的提示信息(setq ipt (getpoint)) ;在屏幕上指定一点并将其坐标值赋予变量“ipt”(setq hgt 15) ;给变量“hgt”赋值(Command "_.TEXT" "_S" "STANDARD" ipt hgt 0 "Hello, Visual LISP!");调用“Commnad”函数与AutoCAD进行通信[img]/Files/AutoCad/146-1.JPG[/img](2) 单击“Standard(标准)”工具栏中的按钮,以“Hello.lsp”为名保存该文件。
CAD插件⾯板快捷键LISP源码教程Cad插件⾯板快捷键LISP源码实例Cad插件⾯板如下:⾯板快捷键效果如下:下边是源码:(DEFUN G ETTOOLS P ATH (/ TMP)(SETQ TMP"C:\\W INDOWS\\K_COM.TXT"))(DEFUN K_KJJ(/ DCL_ID D CL_F ILE D IALOG_R ETURN KEYS KEY LST1 FFK TMP UI% XJ E1 B A FF ) (VL-LOAD-COM)(SETQ DCL_ID (LOAD_DIALOG (SETQ D CL_F ILE (W RITE_D CL_F ORM1))))(VL-FILE-DELETE D CL_F ILE)(SETQ D IALOG_R ETURN 2)(WHILE (>D IALOG_R ETURN 1)(NEW_DIALOG "F ORM1" DCL_ID)(SETQ KEYS '("T EXT1""T EXT2""T EXT3""T EXT4""T EXT5""T EXT6""T EXT7""T EXT8" "T EXT9""T EXT10" "T EXT11""T EXT12""T EXT13""T EXT14""T EXT15""T EXT16""T EXT17""T EXT18" "T EXT19""T EXT20" "T EXT21""T EXT22""T EXT23""T EXT24""T EXT25""T EXT26""T EXT27""T EXT28" "T EXT29""T EXT30" "T EXT31""T EXT32""T EXT33""T EXT34""T EXT35""T EXT36""T EXT37""T EXT38" "T EXT39""T EXT40" "T EXT41""T EXT42""T EXT43""T EXT44""T EXT45""T EXT46""T EXT47""T EXT48" "T EXT49""T EXT50" "T EXT51""T EXT52""T EXT53""T EXT54""T EXT55""T EXT56""T EXT57""T EXT58" "T EXT59""T EXT60" "T EXT61""T EXT62""T EXT63""T EXT64""T EXT65""T EXT66""T EXT67""T EXT68" "T EXT69""T EXT70" "T EXT71""T EXT72""T EXT73""T EXT74""T EXT75""T EXT76""T EXT77""T EXT78" "T EXT79""T EXT80" "T EXT81""T EXT82""T EXT83""T EXT84""T EXT85""T EXT86""T EXT87""T EXT88" "T EXT89""T EXT90" "T EXT91""T EXT92""T EXT93""T EXT94""T EXT95""T EXT96""T EXT97""T EXT98" "T EXT99""T EXT100" "ACCEPT""CANCEL"))(FOREACH KEY KEYS(IF (EVAL (READ KEY ))(SET_TILE KEY (EVAL (READ KEY ))))(ACTION_TILE KEY "(A CTION_F ORM1_K EYS $KEY )"))(SETQ LST1'())(IF(SETQ FFK(OPEN (G ETTOOLS P ATH)"R"))(PROGN(WHILE (SETQ TMP (READ-LINE FFK))(SETQ LST1(CONS TMP LST1)))(CLOSE FFK)(SETQ LST1(REVERSE LST1))(SETQ UI%0)(REPEAT (LENGTH LST1)(SETQ XJ (NTH UI% LST1))(SETQ E1(VL-STRING-POSITION (ASCII ",") XJ)) (SETQ B (SUBSTR XJ 1 E1))(SETQ A (SUBSTR XJ (+ E12)))(SET_TILE (STRCAT "T EXT"(ITOA (+ UI%1))) B) (SETQ UI%(+1 UI%))))(PROGN;;;图层显⽰(SET_TILE "T EXT1""LL")(SET_TILE "T EXT2""LK")(SET_TILE "T EXT3""LP")(SET_TILE "T EXT4""LY")(SET_TILE "T EXT5""LO")(SET_TILE "T EXT6""LU")(SET_TILE "T EXT7""ACC")(SET_TILE "T EXT8""L0")(SET_TILE "T EXT9""CV")(SET_TILE "T EXT10""CY")(SET_TILE "T EXT11""CD")(SET_TILE "T EXT12""VV")(SET_TILE "T EXT13""VH")(SET_TILE "T EXT14""VA")(SET_TILE "T EXT15""KM")(SET_TILE "T EXT16""FS")(SET_TILE "T EXT17""LC")(SET_TILE "T EXT18""SZC")(SET_TILE "T EXT19""SXC")(SET_TILE "T EXT20""SDC");;;⽂本属性(SET_TILE "T EXT21""W2A")(SET_TILE "T EXT22""A2W")(SET_TILE "T EXT23""CA")(SET_TILE "T EXT24""ZX")(SET_TILE "T EXT25""C1")(SET_TILE "T EXT26""WHH")(SET_TILE "T EXT27""WW")(SET_TILE "T EXT28""WEE")(SET_TILE "T EXT29""WQQ")(SET_TILE "T EXT30""WX")(SET_TILE "T EXT31""WA")(SET_TILE "T EXT32""FW")(SET_TILE "T EXT33""WWS")(SET_TILE "T EXT35""YQ") (SET_TILE "T EXT36""YW") (SET_TILE "T EXT37""WY") (SET_TILE "T EXT38""ZS") (SET_TILE "T EXT39""XS") (SET_TILE "T EXT40""DZ");;;标注制图(SET_TILE "T EXT41""SS") (SET_TILE "T EXT42""QK") (SET_TILE "T EXT43""ER") (SET_TILE "T EXT44""OO") (SET_TILE "T EXT45""XX") (SET_TILE "T EXT46""FF") (SET_TILE "T EXT47""CC") (SET_TILE "T EXT48""CII") (SET_TILE "T EXT49""FL") (SET_TILE "T EXT50""FC") (SET_TILE "T EXT51""EEE") (SET_TILE "T EXT52""R2")(SET_TILE "T EXT53""RC") (SET_TILE "T EXT54""KL") (SET_TILE "T EXT55""TT") (SET_TILE "T EXT56""DF")(SET_TILE "T EXT57""JJ") (SET_TILE "T EXT58""L J") (SET_TILE "T EXT59""ZZ") (SET_TILE "T EXT60""Z0") ;;;专业制图(SET_TILE "T EXT61""YU") (SET_TILE "T EXT62""DP") (SET_TILE "T EXT63""HH") (SET_TILE "T EXT64""K0")(SET_TILE "T EXT65""ZC") (SET_TILE "T EXT66""ZD") (SET_TILE "T EXT67""JM") (SET_TILE "T EXT68""HF")(SET_TILE "T EXT69""HFA") (SET_TILE "T EXT70""HO") (SET_TILE "T EXT71""YK") (SET_TILE "T EXT72""FHM") (SET_TILE "T EXT73""HFS") (SET_TILE "T EXT74""CB")(SET_TILE "T EXT76""DK")(SET_TILE "T EXT77""TYC")(SET_TILE "T EXT78""D4")(SET_TILE "T EXT79""JC")(SET_TILE "T EXT80""JT");;;计量统计(SET_TILE "T EXT81""KI")(SET_TILE "T EXT82""BW")(SET_TILE "T EXT83""RK")(SET_TILE "T EXT84""KJ")(SET_TILE "T EXT85""KS")(SET_TILE "T EXT86""JK")(SET_TILE "T EXT87""S2E")(SET_TILE "T EXT88""XM")(SET_TILE "T EXT89""JMM")(SET_TILE "T EXT90""T2E")(SET_TILE "T EXT91""TW")(SET_TILE "T EXT92""MJE")(SET_TILE "T EXT93""DDE")(SET_TILE "T EXT94""WJY")(SET_TILE "T EXT95""WJX")(SET_TILE "T EXT96""ORE")(SET_TILE "T EXT97""RQ")(SET_TILE "T EXT98""YM")(SET_TILE "T EXT99""WK")(SET_TILE "T EXT100""A3")));--<--<-对话框初始化完成-<--<-- (SETQ D IALOG_R ETURN (START_DIALOG))) (SETQ FF (OPEN (G ETTOOLS P ATH)"W")) ;;;图层显⽰(WRITE-LINE (STRCAT TX1",""K_LL") FF) (WRITE-LINE (STRCAT TX2",""K_LK") FF) (WRITE-LINE (STRCATTX3",""K_LP") FF) (WRITE-LINE (STRCAT TX4",""K_LY") FF) (WRITE-LINE (STRCAT TX5",""K_LO") FF) (WRITE-LINE (STRCAT TX6",""K_LU") FF) (WRITE-LINE (STRCAT TX7",""K_ACC") FF) (WRITE-LINE (STRCAT TX8",""K_L0") FF) (WRITE-LINE (STRCAT TX9",""K_CV") FF) (WRITE-LINE (STRCAT TX10",""K_CY") FF) (WRITE-LINE (STRCATTX11",""K_CD") FF)(WRITE-LINE (STRCAT TX13",""K_VH") FF) (WRITE-LINE (STRCAT TX14",""K_VA") FF) (WRITE-LINE (STRCATTX15",""K_KM") FF) (WRITE-LINE (STRCAT TX16",""K_FS") FF) (WRITE-LINE (STRCAT TX17",""K_LC") FF) (WRITE-LINE (STRCAT TX18",""K_SZC") FF) (WRITE-LINE (STRCAT TX19",""K_SXC") FF) (WRITE-LINE (STRCATTX20",""K_SDC") FF) ;;;⽂本属性(WRITE-LINE (STRCAT TX21",""K_W2A") FF) (WRITE-LINE (STRCAT TX22",""K_A2W") FF) (WRITE-LINE (STRCATTX23",""K_CA") FF) (WRITE-LINE (STRCAT TX24",""K_ZX") FF) (WRITE-LINE (STRCAT TX25",""K_C1") FF) (WRITE-LINE (STRCAT TX26",""K_WHH") FF) (WRITE-LINE (STRCAT TX27",""K_WW") FF) (WRITE-LINE (STRCATTX28",""K_WEE") FF) (WRITE-LINE (STRCAT TX29",""K_WQQ") FF) (WRITE-LINE (STRCAT TX30",""K_WX") FF) (WRITE-LINE (STRCAT TX31",""K_WA") FF) (WRITE-LINE (STRCAT TX32",""K_FW") FF) (WRITE-LINE (STRCATTX33",""K_WWS") FF) (WRITE-LINE (STRCAT TX34",""K_DQ") FF) (WRITE-LINE (STRCAT TX35",""K_YQ") FF) (WRITE-LINE (STRCAT TX36",""K_YW") FF) (WRITE-LINE (STRCAT TX37",""K_WY") FF) (WRITE-LINE (STRCAT TX38",""K_ZS") FF) (WRITE-LINE (STRCAT TX39",""K_XS") FF) (WRITE-LINE (STRCAT TX40",""K_DZ") FF) ;;;标注制图(WRITE-LINE (STRCAT TX41",""K_SS") FF) (WRITE-LINE (STRCAT TX42",""K_QK") FF) (WRITE-LINE (STRCATTX43",""K_ER") FF) (WRITE-LINE (STRCAT TX44",""K_OO") FF) (WRITE-LINE (STRCAT TX45",""K_XX") FF) (WRITE-LINE (STRCAT TX46",""K_FF") FF) (WRITE-LINE (STRCAT TX47",""K_CC") FF) (WRITE-LINE (STRCAT TX48",""K_CII") FF) (WRITE-LINE (STRCAT TX49",""K_FL") FF) (WRITE-LINE (STRCAT TX50",""K_FC") FF) (WRITE-LINE (STRCATTX51",""K_EEE") FF) (WRITE-LINE (STRCAT TX52",""K_R2") FF) (WRITE-LINE (STRCAT TX53",""K_RC") FF) (WRITE-LINE (STRCAT TX55",""K_TT") FF) (WRITE-LINE (STRCAT TX56",""K_DF") FF) (WRITE-LINE (STRCATTX57",""K_JJ") FF) (WRITE-LINE (STRCAT TX58",""K_L J") FF) (WRITE-LINE (STRCAT TX59",""K_ZZ") FF) (WRITE-LINE (STRCAT TX60",""K_Z0") FF) ;;;专业制图(WRITE-LINE (STRCAT TX61",""K_YU") FF) (WRITE-LINE (STRCAT TX62",""K_DP") FF) (WRITE-LINE (STRCATTX63",""K_HH") FF) (WRITE-LINE (STRCAT TX64",""K_K0") FF) (WRITE-LINE (STRCAT TX65",""K_ZC") FF) (WRITE-LINE (STRCAT TX66",""K_ZD") FF) (WRITE-LINE (STRCAT TX67",""K_JM") FF) (WRITE-LINE (STRCAT TX68",""K_HF") FF) (WRITE-LINE (STRCAT TX69",""K_HFA") FF) (WRITE-LINE (STRCAT TX70",""K_HO") FF) (WRITE-LINE (STRCAT TX71",""K_YK") FF) (WRITE-LINE (STRCAT TX72",""K_FHM") FF) (WRITE-LINE (STRCAT TX73",""K_HFS") FF) (WRITE-LINE (STRCAT TX74",""K_CB") FF) (WRITE-LINE (STRCAT TX75",""K_CL") FF) (WRITE-LINE (STRCAT TX76",""K_DK") FF) (WRITE-LINE (STRCAT TX77",""K_TYC") FF) (WRITE-LINE (STRCAT TX78",""K_D4") FF) (WRITE-LINE (STRCAT TX79",""K_JC") FF) (WRITE-LINE (STRCAT TX80",""K_JT") FF);;;统计发布(WRITE-LINE (STRCAT TX81",""K_KI") FF) (WRITE-LINE (STRCAT TX82",""K_BW") FF) (WRITE-LINE (STRCATTX83",""K_RK") FF) (WRITE-LINE (STRCAT TX84",""K_KJ") FF) (WRITE-LINE (STRCAT TX85",""K_KS") FF) (WRITE-LINE (STRCAT TX86",""K_JK") FF) (WRITE-LINE (STRCAT TX87",""K_S2E") FF) (WRITE-LINE (STRCAT TX88",""K_XM") FF) (WRITE-LINE (STRCAT TX89",""K_JMM") FF) (WRITE-LINE (STRCAT TX90",""K_T2E") FF) (WRITE-LINE (STRCAT TX91",""K_TW") FF) (WRITE-LINE (STRCAT TX92",""K_MJE") FF) (WRITE-LINE (STRCAT TX93",""K_DDE") FF) (WRITE-LINE (STRCAT TX94",""K_WJY") FF)(WRITE-LINE (STRCAT TX96",""K_ORE") FF)(WRITE-LINE (STRCAT TX97",""K_RQ") FF)(WRITE-LINE (STRCAT TX98",""K_YM") FF)(WRITE-LINE (STRCAT TX99",""K_WK") FF)(WRITE-LINE (STRCAT TX100",""K_A3") FF)(CLOSE FF)(KKKKJ)(UNLOAD_DIALOG DCL_ID)(PRINC))(DEFUN KKKKJ(/ LST FFF TMP UI% XJ E1)(SETQ LST '())(IF(SETQ FFF(OPEN (G ETTOOLS P ATH)"R"))(PROGN(WHILE (SETQ TMP (READ-LINE FFF))(SETQ LST (CONS TMP LST)))(CLOSE FFF)))(SETQ UI%0)(REPEAT (LENGTH LST)(SETQ XJ (NTH UI%LST))(SETQ E1(VL-STRING-POSITION (ASCII ",")XJ))(SETQ B (SUBSTR XJ 1 E1))(SETQ A (SUBSTR XJ (+ E12)))(GKKJ)(SETQ UI%(+1 UI%))))(DEFUN GKKJ ()(EVAL(READ(STRCAT "(DEFUN C:"B"()(VLA-SENDCOMMAND (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT))\"("A")\N\"))")))(PRINC))(KKKKJ)(DEFUN A CTION_F ORM1_K EYS (KEY / TXI%);全部控件的点击动作触发(COND((OR(= KEY "ACCEPT")(= KEY "CANCEL"))(G ET_F ORM1_D ATA)(SETQ TXI%1)(WHILE (< TXI%200)(SET (READ (STRCAT "TX"(ITOA TXI%)))(GET_TILE (STRCAT "T EXT"(ITOA TXI%))))(SETQ TXI%(+ TXI%1))) (DONE_DIALOG 1)))(PRINC))(DEFUN G ET_F ORM1_D ATA(/ KEY)(FOREACH KEY KEYS(SET (READ KEY )(GET_TILE KEY))));每个控件都赋给⼀个变量⽤于下次开启初始化(DEFUN W RITE_D CL_F ORM1(/D CL_F ILE FILE STR)(SETQ D CL_F ILE (VL-FILENAME-MKTEMP NIL NIL ".D CL"))(SETQ FILE (OPEN D CL_F ILE "W"))(FOREACH STR '("KK_BOX:EDIT_BOX { HEIGHT =0.1; HORIZONTAL_MARGIN = NONE ;VERTICAL_MARGIN = NONE ; WIDTH =0.1;}""F ORM1:DIALOG{LABEL =\"快捷键设置\";"":ROW{:BOXED_COLUMN { LABEL =\"图层显⽰\";"":KK_BOX{KEY =\"T EXT1\"; LABEL =\"框显图层\";}"":KK_BOX{KEY =\"T EXT2\"; LABEL =\"全显图层\";}"":KK_BOX{KEY =\"T EXT3\"; LABEL =\"凸显图层\";}"":KK_BOX{KEY =\"T EXT4\"; LABEL =\"框隐图层\";}"":KK_BOX{KEY =\"T EXT5\"; LABEL =\"锁定图层\";}"":KK_BOX{KEY =\"T EXT7\"; LABEL =\"按⾊归层\";}" ":KK_BOX{KEY =\"T EXT8\";LABEL =\"调当前层\";}" ":KK_BOX{KEY =\"T EXT9\";LABEL =\"按⾊显⽰\";}" ":KK_BOX{KEY =\"T EXT10\";LABEL =\"按⾊隐藏\";}" ":KK_BOX{KEY =\"TEXT11\";LABEL =\"按⾊选择\";}" ":KK_BOX{KEY =\"T EXT12\";LABEL =\"框显图元\";}" ":KK_BOX{KEY =\"T EXT13\";LABEL =\"框隐图元\";}" ":KK_BOX{KEY =\"T EXT14\";LABEL =\"全显图元\";}" ":KK_BOX{KEY =\"T EXT15\";LABEL =\"筛选块名\";}" ":KK_BOX{KEY =\"T EXT16\";LABEL =\"筛选属性\";}" ":KK_BOX{KEY =\"T EXT17\";LABEL =\"图层改⾊\";}" ":KK_BOX{KEY =\"T EXT18\"; LABEL =\"刷中线层\";}" ":KK_BOX{KEY =\"T EXT19\"; LABEL =\"刷虚线层\";}" ":KK_BOX{KEY =\"TEXT20\";LABEL =\"刷当前层\";}}" ":BOXED_COLUMN{ LABEL =\"⽂本属性\";"":KK_BOX{KEY =\"T EXT21\";LABEL =\"字转属性\";}" ":KK_BOX{KEY =\"T EXT22\";LABEL =\"属性转字\";}" ":KK_BOX{KEY =\"T EXT23\";LABEL =\"超强复制\";}" ":KK_BOX{KEY =\"T EXT24\";LABEL =\"增序替换\";}" ":KK_BOX{KEY =\"TEXT25\";LABEL =\"加⼀复制\";}" ":KK_BOX{KEY =\"T EXT26\";LABEL =\"⽂字⾼度\";}" ":KK_BOX{KEY =\"T EXT27\";LABEL =\"⽂字排版\";}" ":KK_BOX{KEY =\"T EXT28\";LABEL =\"⽂字左齐\";}" ":KK_BOX{KEY =\"T EXT29\";LABEL =\"⽂字右齐\";}" ":KK_BOX{KEY =\"T EXT30\";LABEL =\"⽂字底齐\";}" ":KK_BOX{KEY =\"T EXT31\";LABEL =\"⽂字线齐\";}" ":KK_BOX{KEY =\"T EXT32\";LABEL =\"⽂字查找\";}" ":KK_BOX{KEY =\"T EXT33\";LABEL =\"批改⽂字\";}" ":KK_BOX{KEY =\"TEXT34\";LABEL =\"标注对齐\";}" ":KK_BOX{KEY =\"T EXT35\";LABEL =\"引线对齐\";}" ":KK_BOX{KEY =\"T EXT36\";LABEL =\"引线字中\";}" ":KK_BOX{KEY =\"T EXT37\";LABEL =\"引线字上\";}" ":KK_BOX{KEY =\"T EXT38\";LABEL =\"中线⽐例\";}" ":KK_BOX{KEY =\"T EXT39\";LABEL =\"虚线⽐例\";}" ":KK_BOX{KEY =\"T EXT40\";LABEL =\"标注原值\";}}"":BOXED_COLUMN{ LABEL =\"标准制图\";"":KK_BOX{KEY =\"T EXT41\"; LABEL =\"默认设置\";}" ":KK_BOX{KEY =\"T EXT42\"; LABEL =\"清空零线\";}" ":KK_BOX{KEY =\"T EXT43\";LABEL =\"分类删除\";}" ":KK_BOX{KEY =\"T EXT44\";LABEL =\"双偏保中\";}" ":KK_BOX{KEY =\"TEXT45\";LABEL =\"双偏删中\";}" ":KK_BOX{KEY =\"T EXT46\";LABEL =\"多重圆⾓\";}" ":KK_BOX{KEY =\"T EXT47\";LABEL =\"定距复制\";}"":KK_BOX{KEY =\"T EXT49\";LABEL =\"分类选择\";}"":KK_BOX{KEY =\"T EXT50\";LABEL =\"分层选择\";}"":KK_BOX{KEY =\"T EXT51\";LABEL =\"删重叠线\";}"":KK_BOX{KEY =\"T EXT52\";LABEL =\"旋转对齐\";}"":KK_BOX{KEY =\"T EXT53\";LABEL =\"旋转复制\";}"":KK_BOX{KEY =\"T EXT54\";LABEL =\"偏块内线\";}"":KK_BOX{KEY =\"T EXT55\";LABEL =\"边界剪切\";}"":KK_BOX{KEY =\"T EXT56\";LABEL =\"线元等分\";}"":KK_BOX{KEY =\"T EXT57\";LABEL =\"框选合线\";}"":KK_BOX{KEY =\"T EXT58\";LABEL =\"框选连线\";}"":KK_BOX{KEY =\"T EXT59\";LABEL =\"图元归零\";}"":KK_BOX{KEY =\"T EXT60\";LABEL =\"归零慎⽤\";}}"":BOXED_COLUMN{ LABEL =\"专业制图\";"":KK_BOX{KEY =\"T EXT61\";LABEL =\"修改云线\";}"":KK_BOX{KEY =\"T EXT62\";LABEL =\"矩形介⼦\";}"":KK_BOX{KEY =\"T EXT63\";LABEL =\"两点填充\";}"":KK_BOX{KEY =\"T EXT64\";LABEL =\"块内零层\";}"":KK_BOX{KEY =\"T EXT65\";LABEL =\"圆折断线\";}"":KK_BOX{KEY =\"T EXT66\";LABEL =\"折断线__\";}"":KK_BOX{KEY =\"T EXT67\";LABEL =\"铝⾓码码\";}"":KK_BOX{KEY =\"T EXT68\";LABEL =\"直焊缝__\";}"":KK_BOX{KEY =\"T EXT69\";LABEL =\"圆焊缝__\";}"":KK_BOX{KEY =\"T EXT70\";LABEL =\"剖圆孔__\";}"":KK_BOX{KEY =\"T EXT71\";LABEL =\"长圆孔__\";}"":KK_BOX{KEY =\"T EXT72\";LABEL =\"保温棉__\";}"":KK_BOX{KEY =\"T EXT73\";LABEL =\"⾓焊缝__\";}"":KK_BOX{KEY =\"T EXT74\";LABEL =\"偏移⼦段\";}"":KK_BOX{KEY =\"T EXT75\";LABEL =\"槽铝断⾯\";}"":KK_BOX{KEY =\"T EXT76\";LABEL =\"硬质垫块\";}"":KK_BOX{KEY =\"T EXT77\";LABEL =\"椭圆圆弧\";}"":KK_BOX{KEY =\"T EXT78\";LABEL =\"四点尖⾓\";}"":KK_BOX{KEY =\"T EXT79\";LABEL =\"⾓钢槽钢\";}"":KK_BOX{KEY =\"T EXT80\";LABEL =\"⽅钢⼯钢\";}}"":BOXED_COLUMN{ LABEL =\"统计发布\";"":KK_BOX{KEY =\"T EXT81\";LABEL =\"快速建块\";}"":KK_BOX{KEY =\"T EXT82\";LABEL =\"炸块成字\";}"":KK_BOX{KEY =\"T EXT83\";LABEL =\"图块改名\";}"":KK_BOX{KEY =\"T EXT84\";LABEL =\"图块基点\";}"":KK_BOX{KEY =\"T EXT85\";LABEL =\"图块改⾊\";}"":KK_BOX{KEY =\"T EXT86\";LABEL =\"交点布块\";}"":KK_BOX{KEY =\"T EXT87\";LABEL =\"属块导表\";}"":KK_BOX{KEY =\"T EXT88\";LABEL =\"线密度__\";}"":KK_BOX{KEY =\"T EXT89\";LABEL =\"截⾯参数\";}"":KK_BOX{KEY =\"T EXT90\";LABEL =\"排字到表\";}"":KK_BOX{KEY =\"T EXT91\";LABEL =\"统字到表\";}"":KK_BOX{KEY =\"T EXT92\";LABEL =\"⾯积到表\";}"":KK_BOX{KEY =\"T EXT93\";LABEL =\"线长到表\";}"":KK_BOX{KEY =\"T EXT94\";LABEL =\"外接圆形\";}"":KK_BOX{KEY =\"T EXT95\";LABEL =\"外接矩形\";}"":KK_BOX{KEY =\"T EXT96\";LABEL =\"图元加框\";}"":KK_BOX{KEY =\"T EXT97\";LABEL =\"画图⽇期\";}"":KK_BOX{KEY =\"T EXT98\";LABEL =\"批改页码\";}"":KK_BOX{KEY =\"T EXT99\";LABEL =\"批量分图\";}"":KK_BOX{KEY =\"T EXT100\";LABEL =\"批量打印\";}}}"":ROW{:TEXT{LABEL=\"命令⽂件位置C:/W INDOWS/K_COM.TXT,删除后相当于初始设置\\";ALIGNMENT=LEFT;}SPACER_1;SPACER_1;SPACER_1; OK_BUTTON;CANCEL_BUTTON;}} ")(WRITE-LINE STR FILE))(CLOSE FILE)D CL_F ILE)(KKKKJ);恢复默认设置命令(DEFUN K_KMR(/ TMP)(IF (FINDFILE(G ETTOOLS P ATH))(VL-FILE-DELETE (G ETTOOLS P ATH)))(KKKKJ)(PRINC));清空命令(DEFUN K_KQK(/ FF)(IF (FINDFILE(G ETTOOLS P ATH))(PROGN (SETQ FF(OPEN (G ETTOOLS P ATH)"W"));;;图层显⽰(WRITE-LINE (STRCAT ",""K_LL") FF)(WRITE-LINE (STRCAT ",""K_LK") FF)(WRITE-LINE (STRCAT ",""K_LP") FF)(WRITE-LINE (STRCAT ",""K_LY") FF)(WRITE-LINE (STRCAT ",""K_LO") FF)(WRITE-LINE (STRCAT ",""K_LU") FF)(WRITE-LINE (STRCAT ",""K_ACC") FF)(WRITE-LINE (STRCAT ",""K_L0") FF)(WRITE-LINE (STRCAT ",""K_CV") FF)(WRITE-LINE (STRCAT ",""K_CY") FF)(WRITE-LINE (STRCAT ",""K_CD") FF)(WRITE-LINE (STRCAT ",""K_VH") FF) (WRITE-LINE (STRCAT ",""K_VA") FF) (WRITE-LINE (STRCAT ",""K_KM") FF) (WRITE-LINE (STRCAT ",""K_FS") FF) (WRITE-LINE (STRCAT ",""K_LC") FF) (WRITE-LINE (STRCAT ",""K_SZC") FF) (WRITE-LINE (STRCAT ",""K_SXC") FF) (WRITE-LINE (STRCAT ",""K_SDC") FF);;;⽂本属性(WRITE-LINE (STRCAT ",""K_W2A") FF) (WRITE-LINE (STRCAT ",""K_A2W") FF) (WRITE-LINE (STRCAT ",""K_CA") FF) (WRITE-LINE (STRCAT ",""K_ZX") FF) (WRITE-LINE (STRCAT ",""K_C1") FF) (WRITE-LINE (STRCAT ",""K_WHH") FF) (WRITE-LINE (STRCAT ",""K_WW") FF) (WRITE-LINE (STRCAT ",""K_WEE") FF) (WRITE-LINE (STRCAT ",""K_WQQ") FF) (WRITE-LINE (STRCAT ",""K_WX") FF) (WRITE-LINE (STRCAT ",""K_WA") FF) (WRITE-LINE (STRCAT ",""K_FW") FF) (WRITE-LINE (STRCAT ",""K_WWS") FF) (WRITE-LINE (STRCAT ",""K_DQ") FF) (WRITE-LINE (STRCAT ",""K_YQ") FF) (WRITE-LINE (STRCAT ",""K_YW") FF) (WRITE-LINE (STRCAT ",""K_WY") FF) (WRITE-LINE (STRCAT ",""K_ZS") FF) (WRITE-LINE (STRCAT ",""K_XS") FF) (WRITE-LINE (STRCAT ",""K_DZ") FF) ;;;标注制图(WRITE-LINE (STRCAT ",""K_SS") FF) (WRITE-LINE (STRCAT ",""K_QK") FF) (WRITE-LINE (STRCAT ",""K_ER") FF) (WRITE-LINE (STRCAT ",""K_OO") FF) (WRITE-LINE (STRCAT ",""K_XX") FF) (WRITE-LINE (STRCAT ",""K_FF") FF) (WRITE-LINE (STRCAT ",""K_CC") FF) (WRITE-LINE (STRCAT ",""K_CII") FF) (WRITE-LINE (STRCAT ",""K_FL") FF) (WRITE-LINE (STRCAT ",""K_FC") FF) (WRITE-LINE (STRCAT ",""K_EEE") FF) (WRITE-LINE (STRCAT ",""K_R2") FF) (WRITE-LINE (STRCAT ",""K_KL") FF) (WRITE-LINE (STRCAT ",""K_TT") FF) (WRITE-LINE (STRCAT ",""K_DF") FF) (WRITE-LINE (STRCAT ",""K_JJ") FF) (WRITE-LINE (STRCAT ",""K_L J") FF) (WRITE-LINE (STRCAT ",""K_ZZ") FF) (WRITE-LINE (STRCAT ",""K_Z0") FF) ;;;专业制图(WRITE-LINE (STRCAT ",""K_YU") FF) (WRITE-LINE (STRCAT ",""K_DP") FF) (WRITE-LINE (STRCAT ",""K_HH") FF) (WRITE-LINE (STRCAT ",""K_K0") FF) (WRITE-LINE (STRCAT ",""K_ZC") FF) (WRITE-LINE (STRCAT ",""K_ZD") FF) (WRITE-LINE (STRCAT ",""K_JM") FF) (WRITE-LINE (STRCAT ",""K_HF") FF) (WRITE-LINE (STRCAT ",""K_HFA") FF) (WRITE-LINE (STRCAT ",""K_HO") FF) (WRITE-LINE (STRCAT ",""K_YK") FF) (WRITE-LINE (STRCAT ",""K_FHM") FF) (WRITE-LINE (STRCAT ",""K_HFS") FF) (WRITE-LINE (STRCAT ",""K_CB") FF) (WRITE-LINE (STRCAT ",""K_CL") FF) (WRITE-LINE (STRCAT ",""K_DK") FF) (WRITE-LINE (STRCAT ",""K_TYC") FF) (WRITE-LINE (STRCAT ",""K_D4") FF) (WRITE-LINE (STRCAT ",""K_JC") FF) (WRITE-LINE (STRCAT ",""K_JT") FF) ;;;统计发布(WRITE-LINE (STRCAT ",""K_KI") FF) (WRITE-LINE (STRCAT ",""K_BW") FF) (WRITE-LINE (STRCAT ",""K_RK") FF) (WRITE-LINE (STRCAT ",""K_KJ") FF) (WRITE-LINE (STRCAT ",""K_KS") FF) (WRITE-LINE (STRCAT ",""K_JK") FF) (WRITE-LINE (STRCAT ",""K_S2E") FF) (WRITE-LINE (STRCAT ",""K_XM") FF) (WRITE-LINE (STRCAT ",""K_JMM") FF) (WRITE-LINE (STRCAT ",""K_T2E") FF) (WRITE-LINE (STRCAT ",""K_TW") FF) (WRITE-LINE (STRCAT ",""K_MJE") FF) (WRITE-LINE (STRCAT ",""K_DDE") FF) (WRITE-LINE (STRCAT ",""K_WJY") FF)(WRITE-LINE (STRCAT ",""K_ORE") FF)(WRITE-LINE (STRCAT ",""K_RQ") FF)。
cad基本操作教程
CAD(计算机辅助设计)是一种工程设计软件,它可以帮助
设计师以更高效和精确的方式创建和修改设计图纸。
要掌握CAD的基本操作技巧,下面是一些常用的操作方法:
1. 打开文件:在CAD软件中,点击文件菜单中的“打开”选项,浏览并选择要打开的文件。
2. 绘制图形:CAD提供了各种绘制工具,如直线、圆形、矩
形等。
选择适当的工具,按住鼠标左键在绘图区域内拖动,即可绘制相应的图形。
3. 编辑图形:CAD具有丰富的编辑功能,可以对已经绘制的
图形进行修改。
选择编辑工具,如移动、旋转、缩放等,在绘图区域内选择要编辑的图形,然后按照软件提示进行相应的操作。
4. 修改属性:CAD中的图形可以具有不同的属性,如颜色、
线型、线宽等。
选择修改属性的工具,在绘图区域内选择要修改属性的图形,然后根据软件提示调整相应的属性值。
5. 图层管理:CAD中可以将不同的图形放置在不同的图层中,以便于管理和控制显示。
选择图层管理工具,可以创建、修改和删除图层,并设定图层的可见性和打印性质。
6. 查看图纸:CAD提供了多种查看图纸的方式,如缩放、平移、旋转等。
选择对应的工具,可以调整图纸的显示范围和角度。
7. 存储文件:每次作业结束后,及时保存图纸文件,防止数据丢失。
选择文件菜单中的“保存”选项,将文件保存到指定的位置。
以上是CAD的一些基本操作教程,希望对初学者有所帮助。
通过不断实践和探索,你将逐渐熟练掌握CAD软件,并能够运用它进行更加精确和高效的设计工作。
lspcad之最菜教程(14-16楼8月13日更新完毕,)首先,本应该是软件的下载和安装。
声明过了,本人太懒,此处略去……。
软件,这里用的是汉化版,华军上down下来的,汉化加破解一并搞定(安装过程可参考:/viewthrea ... p;page=1#pid1910170)。
西风瘦马兄说汉化版有点问题,但我好象还没发现。
然后呢,今天先来摸摸倒相箱的设计过程。
密闭箱不说了,在对闭箱及其箱Q有一定认识的基础上,用喇叭的Qts计算,参考wzy728版主的帖子就足够了。
箱体设计的目的是什么呢?就是:找出合适的箱容积以及合适的导相管大小!打开lspcad,并点击“文件”,选择“新建”→“音箱”→“倒相式”:然后,就会跳出这个,要我们选择一个单元:按确定,跳出文件浏览界面。
这里,lspcad自带了一个"driver"数据库,包含了不少著名单元(遗憾的是,没有hivi,也没有南鲸银笛。
所以对于数据库中没有的单元,只好自己输入参数,就是按取消,到”扬声器单元”下的“编辑创建”中去自己填,这就需要自己测量单元参数后完成,所以以后再说):在“driver"文件夹中,不同单元按品牌归在不同的子文件夹中,这里随便先了一个单拿的六寸半。
选完后,界面变成这样:咦?怎么什么都不见了?哦,都“最小化”在底下猫着呢。
把它们“还原”就可以了(不要最大化,因为窗口很多,如果找不到它们,可以在菜单栏上“窗口”中找一找,如果不小心关了,可以“窗口”中的“显示”中再打开。
窗口很多,我们先来常用的两个:一个是一米半开放,这个与房间无关,主要与箱子有关。
另一个是阻抗曲线,很多人喜欢看双峰的情况,那就一起打开吧。
还有个”信息“其实更重要,大家自己看了就知道,这里只是举例。
可以看到,频响曲线在低频端有明显的”肩“,当然不好。
那怎么办呢?继续点击菜单栏上的”音箱滤波器“,选择”音箱“以上图片太小看不清的话,请点击图片在新窗口打开跳出一个窗口,这里上面是箱体的参数,主要的是箱体积。
2005-10-12Change history2005-10-12• Ch 9.2.3.11 page 38Added description of Digital phase linear FIR filter• Ch 11.1 page 64Added description of crossover emulator feature Causal filter margin and also description of exported impulse responses.• Ch 6.2.1 page 14Removed comment that sets are not stored• Ch 9.4.3 page 50Some changes in textLspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden 1Introduction (2)2Standard vs professional version (3)3Examples and tutorials (3)4Various stuff (4)4.1Entering text (4)4.2Entering/changing values (4)4.3Coordinate system (5)4.4Folders (5)4.5Some do’s and don’ts (5)5Main window (6)6Schema (7)6.1Edit mode (7)6.2Simulate mode (12)7Graphs (15)7.1Menu picks (17)8Settings (18)9Components (25)9.1Passive analog components (25)9.2Active analog/digital components (31)9.3Box modeling components (43)9.4Other components (55)10The optimizer (56)10.1Selecting components (56)10.2The optimize tab (57)10.3The range tab (57)10.4The target tab (58)10.5The other tab (61)11The crossover emulator (62)11.1Filter settings (63)11.2Mapping to audiocard output (65)11.3Soundcard (audio card) access methods (67)12Tolerance analysis (68)13Snapshot (70)14KHF Tool (71)14.1Nearfield calculator (71)14.2Farfield/Nearfield merger (72)15Thermal and nonlinear modeling (73)15.1Brief presentation of the causes for power compression (73)15.2Thermal modeling (76)15.3Nonlinear modeling (77)16References (79)1LspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden 1 IntroductionLspCAD is a software targeted against design of loudspeaker boxes and crossovers. With LspCAD it is possible to model loudspeaker boxes, passive crossovers, active analog and digital crossovers.A nice feature is that it is possible to model everything at the same time, i.e. there is no need to do box modeling first and crossover modeling later, this makes prototyping of new projects easier.Crossovers and boxes are created from a tray of components, the components are picked from the tray and dropped on the schema. This allows for a larger degree of freedom for the user, on the downside is the problem that the design procedure may become more tedious. To alleviate this potential problem, the concept of network sets is implemented. Moreover a number of filter templates are available. Another concept that simplifies designs is the group concept where one can simply group a number of components and later with a simple mouse click change on one set of component values to another set and see the results of the changes instantly.The boxes are designed with building blocks such as ports, cabinet volumes and driver units. For well-known box types a special wizard functionality helps the user to pick an optimal alignment for the given driver.Crossovers that can be implemented are besides analog passive and active filters also digital filters with unit delays and sum units. A paradigm that makes the initial prototype modeling simpler is the parameter mode that allows the user to modify parameters such as crossover frequency and Q value rather than having to fiddle with component values. Components for well-known commercial digital filters such Behringer, dbxPro and XTA is implemented and also optimized. Additionally it is possible to model phase linear loudspeaker systems and also to use impulse responses exported from LspCAD 6 in external convolvers such as BruteFIR.To be able to achieve a given target frequency response a powerful crossover optimizer can be used. This optimizer also gives the option to put constraints on things such as component values and resulting load impedance, the unique feature of the load impedance optimization is that it actually can increase the load impedance while maintaining the desired frequency response. Another feature is that one may lock the crossover frequency during the optimization.The tolerance analysis helps to give a view of how the resulting frequency response of a crossover deviates from the original response once we add the possibility that components might deviate from their specified valuesThe popular real time update feature in LspCAD gives the user a "What you see is what you get" feeling as the graphs are updated each time one change e.g. a component value. Similar to earlier releases it is possible to store intermediate work.2LspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden 3In release 6 the number of open projects is only limited by memory. The methodology differs slightly from earlier releases, rather than storing the current status in a memory location one can in release 6 see each construction as a sheet of paper that one scribble notes on, once one is done with a construction step one can either get a new sheet of paper (New ) or go to the copying machine (Clone ).2 Standard vs professional version This manual describes all the features available in professional version. The standard version has the following features excluded or limited.Crossover emulator, only two channel output possible.Snapshot, only possible to take snapshots of the SPL graphTolerance analysisNonlinear/power compression modelingVoicecoil heatingBl(x) modelingCms(x) modelingExtra transfer functionVoltage graphCurrent graphPolarplotPolarmapPower responseKHF ToolOptimizer options missing in the standard versionOptimize ImpedanceOptimize Transfer functionTarget XO pointsTarget ZminTarget Box volTarget PhaseTarget EQTarget Imported3 Examples and tutorialsExamples and tutorials are collected in a separate document, it may be well spent time to glance through that document as it describes how the software is used in a real situation.LspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden 44 Various stuff4.1 Entering textIt is possible to enter text in various windows. Anodd feature is that, for the text change to take effectone must click with the mouse button in anotherfield. For example if one has entered a text in theAuthor field, then one must click with the mousebutton in the Description field to make the changetake effect.4.2 Entering/changing valuesNumerical values are presented by three meansProperty listThe properties in the property list can be modified in a number of ways.1. Left-click on the parameter that you wish to modify, then click on thearrow left-right keys on the keyboard.2. Left-double-click on a parameter, then enter a new value or use thearrow up-down to modify, to exit, click somewhere else.3. First left-click then right-click on parameter. You now have the option toset the value and also upper and lower limits for the optimizerSingle numerical input field.Left-click inside the box and enter the new value or use the up/down arrowkeys to modify the values, the value increase is bigger if the Ctrl button is alsoheld down.Dropdown listUsed for properties such as filter order et.c. Left-click and select the desiredvalue.LspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden54.3 Coordinate systemAs the drivers and other radiatingelements in LspCAD can be placed atdifferent locations relative to one antherand also made to radiate in otherdirections than perpendicular to the bafflethat faces the listener each other weneed to have a coordinate system.The coordinate system is shown in thefigure to the right.Normally one would set the referencepoint exactly where one driver is located.The most convenient location is wherethe treble unit is located. Therefore thelocation of the treble unit is set to(dx,dy,dz) = (0,0,0).The bass unit may be located with thecenter 150mm below the treble unit,additionally, due to the cone shape it isslightly behind the treble unit (25mm) .The location of the bass unit is thus(dx,dy,dz) = (0,-150,25). Note that a positive dz is away from the listener.4.4 FoldersSomething can be noticed about the subfolders in the LspCAD folders.\examples\ Contains examples that can be loaded.\lib\ Contains PSD files that are useful for e.g thermal modeling purposes.4.5Some do’s and don’ts 4.5.1 Many dialogs openIt may be tempting to have a lot of dialogs open at the same time, for instance it is perfectly possible to run the optimizer at the same time as the crossover emulator is running. Mind though that this can become quite CPU intensive. Therefore it is highly recommended to work with one different tools separately.4.5.2 Several voltage sourcesIf one look at the schemas given by the many examples that comes with this software one can see that the for instance for a two way crossover there are two voltage sources, one could say that biamping is used. This increases computation speed especially when the optimizer is used as the technique of using two voltage sources will ensure that only thenecessary parts of a crossover is recomputed.LspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden 65 Main windowWhen LspCAD 6 is started two windows show up,one is the main window, the other is the schemawindow.From the main window it is possible to do things such as open/save/close projects. Start the optimizer et.c. In LspCAD one can have several projects active,the main control window gives the option to createnew projects, clone the current project or simply todelete a project. There is no limit to how manyproject can be open (besides memory limitation). Three special projects that cannot be deleted are the Scratch pad and the template sections, the template section contains ready to use (grouped)circuit elements of well known circuits such asactive filters and parallel resonance circuits, manyof these elements are equipped with wizards thatare very helpful at least in the initial design. Thereis also a user defined template project, here onecan put personal templates.The menu picks that are available are:File … : Contains the well know save, open and close commandsEdit | Clone project : Possible to clone (make an exact copy) of the current project. Settings : The window that pops up gives access to all project specific settings. Optimizer : Open the optimizer window.Emulator : Open the emulator window.Extras | Snapshot : Open the snapshot window that makes it possible to take snapshotsof the simulation results.Extras | Tolerance analysis : Open the tolerance analysis window that makes it possibleanalyze the sensitivity to component variations.Extras | justMLS : Start the justMLS measurement application.Extras | LspCAD 5.25 : Start the good old LspCAD 5.25.Drag the lower corner to see the component list All open project + templates are accessed from this list box.LspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden 76 SchemaThe circuit schema of the project is drawn in the schema window.There is no limitation to what one can simulate, this means that it is perfectly OK to simulate the low frequency part with a TS driver model while the simulation of themidrange and treble can be done with actual measured data. The schema is divided into 10 pages, each page can host its own circuits and it is also possible to connect between schema pages with a dedicated connector component. Each page is 1600*1200 pixels wide (the grid size is 266*200), which means that quite large schemas fit into each page.The schema window has two modes. The Edit mode and the Simulate mode.In the edit mode the user can move, delete, duplicate, group and ungroup components. In this mode you create the layout of the project.In the simulate mode one can change values, optimize and possibly also create and switch between network and driver sets.6.1 Edit modeIn edit mode components are placed on a schema window according to the design goal, if the goal is a passive parallel topology two way filter the natural choice is two voltagegenerators, two driver units and a bunch of capacitors, inductors and resistors. Those who are familiar mechanical CAD software will get familiar with the schema editor in LspCAD pretty fast.The components are picked from a tray and dropped on the schema. The leads of the components are soldered to one another.In edit mode a component looks rather ugly, this is because it contains a number of hot spots. The round circles are the endpoints of the component connectors, red round circles also serve as locations for component text. The square is the hot spot used when one wish to move, rotate, copy or delete a component.Left click to move solder pointLeft click tomovecomponent.Right click tocopy, delete,and rotateLspCAD 6 manual © Ingemar Johansson, IJData, Luleå, Sweden8 A component is selected by a click with the left mouse button, the right mouse button gives access to functions such as delete, group, ungroup or copy/paste. If one wish to select many components one can do in two ways1. Select the first component, then hold down the shift key and select the other components.2. Hold down the left mouse button and drag the mouse until all components of interest are included in the area, then release the left mouse button..The selected components change color (the rectangular hotspots become red). To unselect one can simply click with the left mouse button outside the select rectangle. Once the components are selected one can do a number of operations on them. Left mouse button operations:• Move : hold down the left mouse button when the cursor is inside the selectrectangle and move the cursor, release the mouse button when you are ready Right mouse button operations:• Rotate : rotate the selected component (if possible, not all components can berotated).• Copy : the selected components are copied and can be pasted anywhere on theschema (or in another project).• Cut : the selected components are cut and can be pasted anywhere on theschema (or in another project).• Paste : paste a compotent (or several components) that has been cut or copiedearlier..• Delete : delete the selected components.• Group : join the selected components in a group, the group concept will beexplained in more detail below.• Ungroup : the opposite of above, for "safety reasons" only one group at a time can beungrouped.• Copy : the selected components are copied and can be pasted anywhere on theschema (or in another project).• Insert | Passive HP/LP filter : insert a passive highpassand/or lowpass filter of with a filter order up to 4. Thecomponent values are computed given a nominal load anddesired cutoff frequencies. In the items are grouped (seeGroup items checkbox) the group will have wizardproperties, which means that one can compute new valuesfor new desired cutoff frequencies later.In some cases components may disappear when one move things to return when one release the mouse button, this is a normal feature and is part of the strive to makecomponent move operations as smooth as possible.6.1.1 The group concept:Once components are joined in a group they are moved together, in one piece, also worth notice is that the grouped component leads cannot be moved, it is however possible to move the hot spots for the component descriptions and also move the entire group.Note that Driver, TS driver, Generator, User note and Baffle components cannot be part of a group.Groups are treated as components, which means that they can be grouped as well.The groups play an important role when we start with the simulations and wish to try out several different combinations of crossover values once the crossover topology is fixed. Once a group is created a rectangle is visible on the schema that displays the size of the group, the solder points of the grouped components also become smaller.The group component is, if it is used correctly a wonderful companion in the design and simulation work. The simplest application is to gather components into a single entity so that they are easier to move around.The most interesting feature with a group is that one can use the same filter topology but with different components. Imagine the situation with a low pass filter with a cutoff frequency of 1000Hz. We can use the group to store the component values for a 1000Hz filter, then we can modify the component values so that we get a 1500Hz filter. With the two settings stored we can very easily switch between the settings. This is a very handy feature especially when we use the emulator.6.1.1.1 WizardsFor well-known groups wizards are implemented, one such example is the 2nd order active low pass filter that is available in the template section. Another example is a bass reflex box where one can immediately see the Helmholtz resonance. The wizards are sort of semi intelligent “gizmos” that knows what the involved circuit is about and can take proper action if one wishes to alter e.g. the cutoff frequency. Many of the groups in the Template project have wizards. Note that if the group is ungrouped the wizard properties are gone.templates6.1.2 TheThe templates are mentioned briefly in previous sections. The templates are loaded automatically when LspCAD is started and is accessed as a separate project (filename:LspCAD_templates.lsp) in the project dropdown listbox in the main window The template section is meaningful only in the edit mode.Do not place your own defined templates in the template project as the templates may be updated with software updates, user defined templates can be placed in the User defined templates projectThe templates are divided into a few pages6.1.2.1 Template page 1 (active templates)This template page contains a numberof good to have active filter blocks. Oneof them is the 2nd order analog LP filter.If one copy this template into a newproject and switch to simulate mode andlater right-click in the group frame (no ona specific component) a dialog willappear. In this dialog a click on theWizard button makes it possible tocompute appropriate values based ondesired fo and Q.6.1.2.2 Template page 2 (passive templates)This template page contains passive templates such as allpass filters and resonance circuits. These components also contain the wizard properties described above.6.1.2.3 Template page 3 (Loudspeaker boxes)This page contains templates for the most common loudspeaker types using dynamic loudspeaker units. Note that both the group with the loudspeaker box components as well as loudspeaker unit component must be picked and copied to a new project. Once the components are placed in a project and simulate mode is entered. When one right click inside the component borders a dialog shows up that looks different depending on mode. (See also ch 9.3).mode6.1.2.3.1 SimpleIn the simple mode the dialog looks like in the previous examples,also in the schema one can see the different parts that constitute abox (box, port, load and radiation component). If one click on theWizard button the programs will compute the appropriate boxproperties for a given, desired alignment and loudspeaker unit(feature not available for Bandpass box II).mode (recommended)6.1.2.3.2 AdvancedTechnically speaking the advanced mode is not more advanced than the simple mode, the difference lies in that in the advanced mode all the box properties are collected in one dialog which makes it very simple to alter values and instantly see the effects of the changes. Additionally, in the schema the different parts that constitute a box are hidden.In the Box tab components such as boxes, ports and passive radiators are collected. In the Radiation tab one can access the properties for the radiation of the parts that face free air. For the bandpass boxes Rear box and Rear port denote the box and port that is located behind the loudspeaker unit while Front box and Front port denote the box and port that is located in front of the loudspeaker unit.6.2 SimulatemodeIn simulate mode the component hotspots are hidden, also the group boundaries become invisible (it is possible to force them to become visible). Hopefully all components form a valid circuit schema. If you see a red cross at an endpoint of a component thismeans that the component is not connected anywhere, most likely this is anerror that needs to be corrected.Another error that might occur is that e.g. a resistor is short circuited, while thisis often OK in a real life situation it wont work in this case, this error is markedup with a large red cross + a circle.The figure above one can see that there are node numbers attached close to each solder point. In most cases these node numbers are not needed and can be hidden (see ch. 8 settings).Store/Recall buttonsIn general component settings are accessible via either the left or the right mouse button, note that one need to click on the component to get access to the settings.Left mouse button operations:The left mouse button gives quick access to the most important property of the component. For a resistor this is the resistor value while for a buffer amplifier the gain value is the most important.Normally a small edit box will appear where one may alter the value, the edit box will disappear when one click on the close butten in upper right corner or click on another component.If one click on a driver unit the driver unit settings dialog will pop up.All edit boxes and dialogs will be described in more detail later in this manual.If one click with the mouse outside a component nothing happens unlessthe click point is inside the boundaries of a group, then a small list box willpopup where one can select the network set.Right mouse button operations:With a right mouse button click on a component one gets access to moreadvanced component settings, for a capacitor one can set e.g. the lossfactor and the ESR. Advanced group settings include the options to createand delete network sets.buttons6.2.1 Store/RecallWith the store/recall buttons it is possible to store different stages in a development project, this is an alternative to the group concept (ch 6.1.1).Stored sets are NOT saved in the project files, instead they are saved in the file LspCAD_sets.lsp in the LspCAD 6 root folder, this means that the same sets are available when one opens other projects.6.2.2 Changing group propertiesIn one right click inside a group in simulate mode a groupproperty dialog appears. In this dialog it is possible to cloneand delete component sets in the group and also to enter anickname and a description for the group7 GraphsThe graphs in LspCAD are collected in a window with a bunch of tabs. Each tab hides its own graph. A graph may e.g. be a frequency response. To make reading easier a legend box is also included. The callout text can be used to add extra text in the graph to describe some extra features. By default the callout box is visible as a gray box in the upper right corner. This box will change to fit the entered text. In is possible from the settings menu to hide the legend and the callout text completely if this is desired.The graphs can be cloned (or undocked) to make it possible to view several graphs at the same time, this may be handy if one e.g. wish to see both the sound pressure level and the impedance at the same time, note however that having many graphs visible at the same time will slow down computations a bit.All graphs are updated in real time with the exception of the polar maps, as the latter are very CPU intensive. It is also recommended to not have the polar maps visible unless one need to as the redrawing of these is also quite heavy.Right click inside thisrectangle to modify textRight click to togglebetween absolute/relativey-axis reading. (notpolarplot/polarmap).Hold down and drag leftbutton to move text orlegendLeft click inside small boxto change pen styleThe figure below shows the polar map. Note that one need to click on the Compute button to make a computation.picks7.1 Menu7.1.1 PrintThe graphs can be printed to any printer, click on Print in the menu to print out the graph that is visible for the moment. Note that the print scale may be changed in the Settings dialog (see ch. 8).7.1.2 CopyThe visible graph is copied to the Windows clipboard7.1.3 ExportThe graph data can be exported, one can select to export either the displayed range or the working range (see Settings). The simple export format is just an export format with data arranged in columns while the Matlab format is used by eg. The Klippel system.8 SettingsAll settings in LspCAD 6 are collected in a Settings dialog that is accessible from the main menu. This dialog contains a number of tabs and also a menu. In the menu one can select to Import settings from another LspCAD 6 project and also to Save as default the present settings.General tab:Range: Settings for display and working range and inputvoltage to the simulations and the number ofsimulation points. There are 8 presets that onecan modify.Component snap: Makes it possible to snap the passivecomponent values to E24 or E12 standardcomponent values.Schema: Affects the properties of the schema. Showgroup borders checked will make it possible tosee the borders of component groups. HaveShow node numbers checked if you want tosee the node numbers in the schema.The print scale can be set to three differentvalues.Digital filters: The sample rate of digital filters, thisnumber is used if indicated by the settings forthe digital filters.Graphs: Uncheck Show legends if they are not neededin the graphs. Similar applies to callouts.SPL/Xfer:SPL:: Controls the appearance of the SPL andtransfer function graphs. In the Show box onecan select which simulated responses shouldbe seen in the graph.Two entities, Combined and Reference arealways present in this box. When Combined ischecked the combined SPL is displayed in thegraph, this combined SPL is given by thesettings in the Combine for total SPL box. IfReference is checked an imported referenceSPL curve is displayed.Individual spkrs. Makes it possible to view theSPL of individual speakers in case there areseveral in a Driver unit.Show phase makes it possible to see thephase of the combined SPL.In a separate subgroup one can specify theObservation angle if other angles that straighton axis is desirable. A positive angle in the Xdirection means “mic to the right of thespeaker” (see ch 3).Xfer (Transfer function): In the Show box one select whichsimulated transfer functions should be visible in the Xfer graph. The Nodedifference feature makes it possible to probe the node difference voltage andto divide this figure by the node difference voltage of a reference.The derived transfer function is given by the ratio of node voltage differences,in the example displayed above the voltage at node 5 is divided by the voltageat node 3.Range: The display range of the SPL/Xfer graphsHeadroom: Makes it possible to add a few dB headroom to the graphs for better readability.Measurement distance: Simulated measurement distance (if not Infinite), also one can select to simulate the phase with the time of flight to the “measurement mic”added (Excess phase).Reference: The reference is imported as an ASCII data file with values arranged column wise. The first (leftmost) column is the frequency points while thesecond is the dB values. The reference can be displayed in either the SPL orthe Xfer graph.。
CAD设计必学秘籍个能够快速完成任务的快捷键技巧全解析CAD设计必学秘籍:个能够快速完成任务的快捷键技巧全解析在现代的设计行业中,计算机辅助设计(CAD)已经成为了必不可少的工具。
CAD软件具有强大的功能,但如果不熟练操作,可能会浪费大量的时间。
为了提高工作效率,学习和掌握一些CAD的快捷键技巧是非常重要的。
本文将全面解析CAD设计中的一些常用快捷键技巧,帮助您快速完成任务。
一、绘图工具快捷键1. 线段:L用L键可以快速选择绘制线段的工具,简化了绘图的过程。
按下L键后,鼠标移动即可绘制线段。
2. 矩形:REC使用REC快捷键可以快速选择绘制矩形的工具。
按下REC键后,按住鼠标左键拖动即可创建矩形。
3. 多边形:POL使用POL快捷键可以快速选择绘制多边形的工具。
按下POL键后,决定多边形的边数,按住鼠标左键拖动即可绘制多边形。
4. 圆形:CIR使用CIR快捷键可以快速选择绘制圆形的工具。
按下CIR键后,按住鼠标左键拖动即可创建圆形。
二、修改工具快捷键1. 移动:M使用M键可以快速选择移动工具。
选中需要移动的对象后,按下M键,按住鼠标左键拖动即可移动对象。
2. 复制:CP使用CP键可以快速选择复制工具。
选中需要复制的对象后,按下CP键,按住鼠标左键拖动即可复制对象。
3. 旋转:RO使用RO键可以快速选择旋转工具。
选中需要旋转的对象后,按下RO键,然后按住鼠标左键拖动即可旋转对象。
4. 缩放:SC使用SC键可以快速选择缩放工具。
选中需要缩放的对象后,按下SC键,按住鼠标左键拖动即可缩放对象。
三、视图操作快捷键1. 平移:TP使用TP键可以快速选择平移工具。
按下TP键后,按住鼠标左键拖动即可平移画布。
2. 缩放:Z使用Z键可以快速选择缩放工具。
按下Z键后,按住鼠标左键拖动即可缩放画布。
3. 旋转:R使用R键可以快速选择旋转工具。
按下R键后,按住鼠标左键拖动即可旋转画布。
四、快捷键技巧1. 撤销:Ctrl + ZCtrl + Z组合键可以实现撤销上一个操作,帮助您快速更正错误。
CAD中的命令行操作技巧CAD是一款广泛应用于建筑设计、工程制图和制造业的软件,它拥有丰富的功能和强大的绘图工具。
在使用CAD时,掌握一些命令行操作技巧可以提高工作效率,简化操作流程。
本文将介绍CAD中的命令行操作技巧,帮助读者更加高效地使用CAD软件。
1. 命令提示符在CAD中,命令提示符是我们输入命令的地方。
通过找到命令提示符,用户可以直接在其中输入命令,并按下回车键执行。
命令提示符通常位于CAD界面的底部或顶部,它是一个类似于文本框的区域。
2. 快捷键CAD中有许多常用的快捷键,可以帮助我们快速执行某些命令。
以下是一些常用的快捷键:- “L”:直线命令- “C”:圆命令- “R”:矩形命令- “M”:移动命令- “Z”:缩放命令- “E”:擦除命令- “P”:偏移命令- “X”:剪切命令- “Y”:镜像命令- “S”:拉伸命令- “A”:阵列命令通过熟练掌握这些快捷键,用户可以快速调用相应的命令,提高绘图效率。
3. 命令别名CAD中的命令别名功能允许用户为常用的命令创建自定义的别名。
通过定义别名,用户可以简化输入命令的过程。
例如,用户可以将“L”命令定义为“LINE”,这样在输入别名时就可以直接输入“L”,而无需输入完整的命令。
要定义命令别名,可以通过以下步骤操作:- 在CAD的命令行中输入“ALIAS”- 按下回车键进入命令别名编辑界面- 在左侧的“按键”列中输入别名(通常为一个字母)- 在右侧的“定义”列中输入对应的命令名称- 点击“添加”按钮保存设置通过设置命令别名,用户可以根据自己的习惯为常用命令创建简化的快捷方式,提高工作效率。
4. 命令自动完成CAD中的命令自动完成功能可以帮助用户更快地输入命令。
当用户在命令行中输入部分命令时,系统会自动匹配已经输入的内容,并显示可能的命令选项。
用户可以使用方向键或鼠标点击来选择所需的命令,然后按下回车键执行。
例如,当用户输入“LI”时,系统可能自动匹配“LINE”命令,并在下方显示该命令选项。
CAD操作技巧CAD(计算机辅助设计)是现代工程和设计领域中不可或缺的工具。
熟练运用CAD软件可以提高工作效率,并且能够实现更精确的设计。
本文将介绍一些CAD操作技巧,以帮助读者更好地掌握CAD软件的使用。
一、信号标注在CAD软件中,信号标注是一个重要的步骤,用于确保设计的准确性和可读性。
以下是几种常用的信号标注技巧:1. 使用图层:将不同类型的信号放在不同的图层上,例如电源、地面等。
这样可以使设计更清晰,并且可以方便地进行修改。
2. 使用标准符号:CAD软件通常提供了许多标准符号库,可以直接使用。
选择适当的符号,可以使设计更易于理解,并且遵循行业的标准。
3. 确保标注的准确性:在标注信号时,务必确保准确性。
检查电压、电流和方向等参数,并使用正确的单位进行标注。
二、图纸布局良好的图纸布局对于CAD设计来说至关重要。
以下是几种常用的图纸布局技巧:1. 使用图纸边界:在绘制图纸时,使用适当的图纸边界来界定设计的范围。
这有助于保持图纸的整洁,并且可以方便地将多个图纸组合在一起。
2. 定义合适的比例尺:根据设计的要求和图纸的尺寸,选择合适的比例尺。
这可以确保设计的准确性,并且使图纸易于理解。
3. 合理安排图纸内容:将不同的功能区域和零件放置在适当的位置。
例如,将功率电路、信号电路和地面电路分开,并使其在图纸上有清晰的界线。
三、快捷键和命令熟练使用CAD软件的快捷键和命令可以大大提高工作效率。
以下是几个常用的快捷键和命令:1. 移动命令(Move):可以快速移动选定的对象,只需选择对象,指定基点和目标点即可。
2. 复制命令(Copy):可以将选定的对象快速复制到新的位置,只需选择对象,指定基点和目标点即可。
3. 缩放命令(Scale):可以快速缩放选定的对象,只需选择对象,指定基点和缩放比例即可。
4. 旋转命令(Rotate):可以快速旋转选定的对象,只需选择对象,指定基点和旋转角度即可。
5. 镜像命令(Mirror):可以快速镜像选定的对象,只需选择对象,指定镜像线即可。
2014年版CAD操作教程(全)1. CAD软件概述CAD (ComputerAided Design) 是一种计算机辅助设计软件,广泛应用于建筑、机械、电子、土木工程等领域。
2014年版的CAD软件在功能和操作上进行了许多改进,更加易于使用和高效。
2. 安装和启动CAD软件启动: 安装完成后,双击桌面上的CAD图标,启动软件。
您也可以从开始菜单中选择CAD软件启动。
3. 熟悉CAD界面菜单栏: 包含文件、编辑、视图、插入、格式等菜单,用于执行各种操作。
工具栏: 包含常用的工具按钮,例如画线、画圆、移动、复制等。
绘图区: 用于绘制和编辑图形的区域。
命令行: 用于输入命令和查看命令提示的区域。
状态栏: 显示当前绘图状态,例如坐标、图层、捕捉模式等。
4. 基本绘图操作画线: 使用 "Line" 命令,在绘图区鼠标左键确定起点和终点,绘制直线。
画圆: 使用 "Circle" 命令,在绘图区鼠标左键确定圆心,然后输入半径或直径,绘制圆形。
画矩形: 使用 "Rectangle" 命令,在绘图区鼠标左键确定矩形的两个对角点,绘制矩形。
移动对象: 选择要移动的对象,然后使用 "Move" 命令,指定移动的起点和终点,移动对象。
复制对象: 选择要复制的对象,然后使用 "Copy" 命令,指定复制的起点和终点,复制对象。
5. 图层管理图层是CAD中用于组织和管理图形对象的重要工具。
您可以为不同的图形对象设置不同的图层,例如墙、门窗、家具等。
创建图层: 使用 "Layer" 命令,在 "Layer Properties Manager" 对话框中创建新的图层。
设置图层属性: 在 "Layer Properties Manager" 对话框中,您可以设置图层的名称、颜色、线型、线宽等属性。
Lisp教程一.Lisp基础知识二.对话框基础一.基本知识第1节--------------------------------------------------------------------------------基本知识AutoLISP是一种针对扩充及自订AutoCAD函数机能而产生,以LISP为基础的程序设计语言.LISP本身于50年代末期出现,是一种擅于处理串行文字(List of Processing),属第四代「人工智能(Artificial Intelligence)」的计目的是令使用者充份利用AutoCAD进行开发,直接增加及修改AutoCAD指令.AutoLisp语言建基于普通的LISP语言上,并扩充了许多适用于CAD的特殊功能而形成.是一种能以直译方式(不须先行编译)亦可于AutoCAD内部执行的直译性程序语言.程序容易学习及撰写,程序即使出错亦不会对操作系统(如DOS,WINDOWS)有不良影响.数据及程序均统一以串行(List)结构表示.可直接调用几乎全部的AutoCAD命令.既具备一般高级语言的基本结构和功能,亦有一般高级语言没有的强大图形处理能力.内建于AutoCAD应用程序,不须另行购买;亦不须使用特定的编辑器或开发环境.可配合AutoCAD提供的PDB,建立DCL(Dialog Control Language)文件创建对话框.缺点: 执行速度较ObjectArx(旧称ARX,以C或C++程序开发,取代以前的ADS)程序慢;原程序不易保护;对低阶的硬件数据不易存取.第2节--------------------------------------------------------------------------------函数(Function)在AutoLISP程序语言中所有的成份都是以函数的形式出现,AutoLISP程序就是顺序执行连串的函数.函数的运行过程就是对函数的求值(结果)过程;函数的基本语法如下:(函数名称参数1 参数2....)e.g. (PRINC "AutoLISP Programming")每一个完整的函数必须包在一对小括号( )内,左边为开括号,右边为关括号;如有若干数量的开括号,则一定有同等数量的关括号对应.左边开括号后紧随函数名称.函数名称与参数之间,或参数与参数之间须最少留一个空格.函数可有一个或多个参数(也可能没有参数),视该函数而定.函数名称不分大小写,即大小写字母视为相同.第3节--------------------------------------------------------------------------------数据型态(Data Type)整数(INT)没有小数字的数值,32位有号数,范围从+2,147,483,647到-2,147,483,648实数(REAL)带小数字的数值,以倍精度浮点格式储存(最少14位小数) e.g. 12.5当数值在1与-1之间时,必须加上前导零 e.g. 0.05可以科学记号表示: 在E或e后加上次方值 e.g. 4.1e-6字符串(STR)一般文字,其前后必须加上双引号" e.g. "AutoCAD"控制字符或脱逸码必须为小写,且须在字符前加上反斜线\ e.g. "\AutoCAD"像素名称(ENAME)是指定给图文件内对象的指针(Pointer,为16进位的数字卷标)e.g. <Entity name:14e5180>像素名称在图文件内是唯一的,不会重复对象的像素名称只在目前作业中有效,再开启图档时,会指定新的像素名称予该对象档案(FILE)以OPEN函数所开启档案的指针,作为其它函数(读写该档案)的自变量选集(PICKSET)用SSGET等函数建立的一个或多个对象的集合或群组转化(V ARIANT)可将像素名称转换为可与ActiveX配搭使用的VLA-Object对象符号(SYM)用以储存静态数据的名称;例如内建或使用者定义的函数符号名称不分大小写,可由任意长度的可打印字符组成;但下列的字符除外:左括号( 右括号) 句点. 单引号' 双引号" 分号;表(LIST)亦称为串行,是放在一对小括号( ) 内,一个或多个元素的有序集合e.g. (1.0 "Lisp" ( ) (5.6 7))元素可以是字符串,符号,整数或实数;也可以是另一个表元素与元素之间要用空格隔开,但元素与小括号之间则可以不隔空格为便于存取表内各元素,每个元素均有其序号;从表的左边开始,第一个元素序号为0,依此类推表的大小即为其顶层元素的数量(内层嵌套式的表,视为单一元素)点对(Dotted Pair)亦是表的一种;表内有2个元素,中间以一圆点分隔,且元素与圆点之间亦须以空格分开若表内没有任何元素,称为空串行或空表;以( ) 或(NIL) 表示第4节--------------------------------------------------------------------------------变数(Variable)为程序执行中动态储存数据的符号名称;主要分为2类:区域(Local)变量又称为局部变量;该变量只在该程序段落中有效,不能为其它程序使用全域(Global)变量又称为整体变量;变量在所有程序段落中均可使用变量名称与符号的限制相同,使用时宜采用有意义及易于辨别的名称变量在赋值或使用前无须先行设定相同的变量可以储存不同型态的数据(但同一时间内只可储存一种型态)在指定新的数据之前,变量储存的内容会保持不变赋值将数据给予指定的变量储存以内建函数SETQ进行(可用于绘图模式的指令行或AutoLISP程序),其语法如下:(SETQ 变量名称1 资料1 [变量名称2 资料2 ....] )e.g. (SETQ NAME "David" AGE 37 WEIGHT 72.5 POINT (LIST 10 20))在函数名称之后,各参数以两个一组,每组左边为变量名称,右边为存入变量的数据亦可将变量名称赋以空值(NIL) :e.g. (SETQ OCCUPATION NIL)要显示变量所储存的数据,可以使用内建函数PRINC(可用于绘图模式的指令行或AutoLISP程序),其语法如下:(PRINC 变量名称)e.g. COMMAND : (PRINC NAME) Result : David"David"在绘图模式中,亦可于指令行中使用感叹号! 来显示变量内容,或作为指令选项的输入值;语法如下: !变量名称e.g. COMMAND : !NAME Result : "David"在Visual LISP的主控台窗口中,于提示符号_$ 后键入要显示的变量名称_$变量名称e.g. _$NAME要检查变量所储存的数据型态,可使用内建函数TYPE;语法如下:(TYPE 变量名称)e.g. COMMAND : (TYPE NAME) Result : STR若检查的变量没有储存数据,则会传回NIL第5节--------------------------------------------------------------------------------练习(Exercises)将四个坐标分别存入四个变量中,并以LINE或PLINE指令,配合四个坐标变量,画出正四边形. COMMAND : (SETQ POINT1 (LIST 0 0) POINT2 (LIST 0 10) POINT3 (LIST 10 10) POINT4 (LIST 10 0)) COMMAND : LINE ;直线段指令COMMAND : !POINT1 ;第一点(左下角起点)COMMAND : !POINT2 ;第二点(左上角)COMMAND : !POINT3 ;第三点(右上角)COMMAND : !POINT4 ;第四点(右下角)COMMAND : C ;自动联机至起点以关闭四边形画圆: 将圆心坐标及半径长度分别存入两个变量中(变量名称及数据型态自订)COMMAND : (SETQ CEN (LIST 0 0) RAD 20) ;将圆心点设为坐标0,0;半径为20COMMAND : CIRCLE ;执行划圆指令Specify center.... : !CEN ;在提示后以变量CEN响应输入Specify radius.... : !RAD ;在提示后以变量RAD响应输入将不同型态的数据,分多次存入相同的变数内;每次均以PRINC及TYPE函数显示变量内容及其数据型态COMMAND : (SETQ TEMP 1.2) ;将实数1.2存入变数TEMPCOMMAND : !TEMP Result : 1.2COMMAND : (TYPE TEMP) Result : REALCOMMAND : (SETQ TEMP "AutoLISP") ;将字符串存入变量TEMPCOMMAND : !TEMP Result : "AutoLISP"COMMAND : (TYPE TEMP) Result : STR二数值资料第1节--------------------------------------------------------------------------------基本运算加函数(+ [数值参数1 数值参数2 ....] )e.g. (+ 2.5 4 6) Result : 12.5函数的结果为各参数之总和若仅提供一个参数,则以0加上此参数的结果为返回值若没有提供任何参数则传回0;各参数须为整数或实数型态若所有参数均为整数,结果亦为整数;若其中一个参数为实数型态,结果会转换为实数减函数(- [数值参数1 数值参数2 ....] )e.g. (- 10 2 3) Result : 5结果为第一个(最左边)参数减去其右边各参数的总和若只提供一个参数,返回值为0减去该参数的结果若没有提供任何参数则传回0;各参数须为整数或实数型态若所有参数均为整数,结果亦为整数;若其中一个参数为实数型态,结果会转换为实数乘函数(* [数值参数1 数值参数2 ....] )结果为所有参数的乘积若只提供一个参数,则返回值为该参数乘以1的结果若没有提供任何参数则传回0;各参数须为整数或实数型态若所有参数均为整数,结果亦为整数;若其中一个参数为实数型态,结果会转换为实数除函数(/ [数值参数1 数值参数2 ....] )e.g. (/ 24 2 3) Result : 4结果为第一个(最左边)参数除以其右边各参数的乘积若仅提供一个参数,则返回值为该参数除以1的结果若没有提供任何参数则传回0;各参数须为整数或实数型态若所有参数均为整数,结果亦为整数;若其中一个参数为实数型态,结果会转换为实数注意: 在本篇教程中,各函数的数值参数,均可以变量(储存值只可以是整数或实数,且不可以是空值nil)取代第2节--------------------------------------------------------------------------------练习(Exercises)计算式(2+4)*3COMMAND : (* 3 (+ 2 4)) Result : 18计算式(50-8*5)/4COMMAND : (/ (- 50 (* 8 5)) 4) Result : 2注意: 上式的正确答案应是2.5,因为函数中的各参数均为整数,所以传回的结果亦为整数递增及递减递增(1+ 数值参数)e.g. (1+ 2) Result : 3递减(1- 数值参数)e.g. (1- 4) Result : 3三角函数(Trinagular Function)正弦值(SIN 弧度参数)e.g. (SIN 1) Result : 0.841471余弦值(COS 弧度参数)e.g. (COS 1) Result : 0.540302反正切值(A TAN 弧度参数)e.g. (ATAN 1) Result : 0.785398第3节--------------------------------------------------------------------------------其它数值处理次方值(EXPT 数值参数次方值)e.g. (EXPT 2 4) Result : 16若参数及次方值两个均为整数,返回值亦是整数;若其中一个为实数,结果为实数开方根(SQRT 数值参数)e.g. (SQRT 30) Result : 5.47723(ABS 数值参数)e.g. (ABS -123) Result : 123余数(REM [数值参数1 数值参数2 ....] )e.g. (REM 50 26 5) = (REM (REM 50 26) 5) Result : 4将参数1整除参数2的余数若参数多于2个时,则会将余数再整除下一个参数,再得出余数;依此类推若其中一个参数为实数时,则结果为实数;否则为整数最大公约数(GCD 数值参数1 数值参数2 )e.g. (GCD 81 57) Result : 3两个参数均必须为整数值型态自然对数(LOG 数值参数)e.g. (LOG 3.5) Result : 1.25276是EXP函数的反函数;传回值为实数型态自然反对数(EXP 数值参数)e.g. (EXP 1.25276) Result : 3.49999是LOG函数的反函数;传回值为实数型态第4节--------------------------------------------------------------------------------数值资料转型实数转整数(FIX 数值参数)e.g. (FIX 12.56) Result : 12只会截去小数部份(小数字不会4舍5入)整数转实数(FLOAT 数值参数)e.g. (FLOAT 12) Result : 12.0整数转字符串(ITOA 数值参数)e.g. (ITOA -17) Result : "-17"数值转字符串(RTOS 数值参数[模式[小数字] ] )e.g. (RTOS 17.23333 2 3) Result : 12.266若不设定模式,则依系统变量LUNITS 的设定值转换数值为字符串若不设定小数字,则依系统变量LUPREC 的设定值转换模式设定值可以是下列数值之一:1 = 科学记号2 = 十进制3 = 英呎及十进制英吋4 = 英呎及分数位英吋5 = 分数当选用的模式为3,4或5,则传回的字符串受系统变量UNITMODE影响(ANGTOS 角度参数[模式[小数字] ] )e.g. (ANGTOS 0.785398 0) Result : "45"e.g. (ANGTOS 0.785398 4) Result : "N 45d E"若不设定模式,则依系统变量AUNITS的设定值转换数值为字符串若不设定小数字,则依系统变量AUPREC的设定值转换模式设定值可以是下列数值之一:0 = 度1 = 度/分/秒2 = 分度量3 = 弪度4 = 土地测量单位当选用的模式为4,则传回的字符串受系统变量UNITMODE影响反函数为ANGTOF;参阅第5篇教程第5节--------------------------------------------------------------------------------数值资料检查数值(NUMBERP 数值参数)e.g. (NUMBERP -3.45) Result : Te.g. (NUMBERP "AutoLISP") Result : nil注意: 在范例的传回值中,T表示函数的结果为真(成立),nil表示结果为假(不成立)负数值(MINUSP 数值参数)e.g. (MINUSP -3.45) Result : Te.g. (MINUSP 0) Result : nile.g. (MINUSP 3.45) Result : nil零值(ZEROP 数值参数)e.g. (ZEROP 0) Result : Te.g. (ZEROP 3.45) Result : nil其它应用最大值(MAX [数值参数1 数值参数2 ....] )e.g. (MAX -88 5 2) Result : 5若没有提供任何参数,则传回值为0最小值(MIN [数值参数1 数值参数2 ....] )e.g. (MIN -88 5 2) Result : -88若没有提供任何参数,则传回值为0第6节--------------------------------------------------------------------------------练习(Exercises)计算下列算式:(+ 1234567890 1234567890) Result : -1825831516上式中两个数值参数均为整数,而结果值大于整数型态所能容许之范围;固导致发生溢位问题,产生无效的结果.修正算式如下: 只要将其中一个参数改为实数型态即可.(+ 1234567890.0 1234567890) Result : 2.46914e+009(+ 9876543210 1234567890) Result : 1.11111e+010上式中两个数值参数均为整数,但其中一个(第一个)参数巳大于整数型态所能容许之范围;系统会自动将此参数先行转为实数型态才计算.计算下列算式:(FIX (SQRT (+ 1 (MAX 20 10 40 30)))) Result : 6---- 最先执行的是最内层的算式(MAX 20 10 40 30) ,求出最大值为40---- 其次执行加函数,将MAX函数所得的最大值加1,结果为41---- 再利函数SQRT,将41开方根,结果为6.4031---- 最后使用FIX函数,截去其小数字,得到最后的结果为6三程序设计第1节--------------------------------------------------------------------------------使用者定义函数是将一群表示式组合成一个函数或指令可应用于绘图模式的指令行提示,Visual LISP主控台,或供其它自定义函数内的表示式呼叫使用AutoLISP原始程序代码均以纯文字格式存盘,扩展名为LSP(2000版可编译成扩展名为FAS的档案可以一般文字编辑器进行开发,如DOS的EDIT,WINDOWS的WORD或WORDPAD等一个自定函数内最少要有一个表达式在原程序文件(LSP)里,自定义函数以DEFUN函数开始;其语法如下:(DEFUN [C:] 函数名称( [自变量串行...] [/ 局部变数串行...] ) 表达式...)在呼叫带有自变量的自定函数时,必须同时提供与定义函数时,同等数量的参数,使各参数传入自定函数的各自变量中自变量被视为一种特殊类型的局部变量,无法用于该自定函数以外的其它函数若自定函数中无须设定任何自变量,亦必须以空串行( )加在函数名称之后若有提供局部变量,必须以斜线/ 加在局部变量的开头(即使前面没有自变量串行)各自变量,斜线,局部变量之间要以空格分隔;但与左右小括号之间则不须以空格分开若自变量串行中有相同名称的自变量出现,则会忽略第一个以后的相同自变量;变数亦是一样若在函数名称前加上C:,表示该函数可以在绘图模式的指令行提示下,其执行方式与内建函数相同;亦可以在任何内建命令(执行中)的提示后,以通透方式执行(但须将函数名称包在一对小括号中) 若在函数名称前没有加上C:,在指令行提示下,必须将函数名称包在一对小括号中才可执行不可以在执行一自定函数时,以通透方式执行另一自定函数第2节--------------------------------------------------------------------------------加载程序自定函数在使用前,都要将其所在的程序文件(扩展名为LSP)加载才可执行ACAD.LSP程序文件(预设在SUPPORT子目录内)会在启动AutoCAD时自动加载(LOAD "程序文件名称" [加载失败] )e.g. (LOAD "TEST")若程序文件之文件名为LSP,则在程序文件名称之后,可以不加上扩展名若有需要,系统会顺序尝试其它的扩展名: VLX FAS LSP若程序文件不在系统的支持目录下,则需在文件名前加上目录路径注意: 必须以正斜线/ 或两个反斜线\\ 作为目录的分隔符可以在加载失败的参数中提供字符串,以供加载失败时显示;亦可提供有效的自定函数,该函数在加载程序文件失败时会被执行注意:在程序文件加载后,在提示行显示的返回值,一般是该程序文件中,最后被定义的函数名称或是在程序文件内没有包含在自定函数中,最后一个表达式的执行结果第3节--------------------------------------------------------------------------------练习(Exercises)启动文字编辑器,编写一AutoLISP程序作两个同心圆(第1个圆半径为50,第2个圆半径为80),程序代码如下所示:(DEFUN C: 2CIRCLE () (SETQ CEN (LIST 0 0) RAD 50)(COMMAND CIRCLE CEN RAD)(COMMAND CIRCLE CEN (+ RAD 30)))---- 输入后以纯文字格式存盘(C:\TEST.LSP)---- 在AutoCAD绘图模式的指令行提示后,用LOAD函数将程序文件加载COMMAND : (LOAD "C:/TEST")---- 在指令行提示后,输入程序(函数)名称执行COMMAND : 2CIRCLE程序说明1 使用DEFUN建立自定函数的名称,并用SETQ函数将中心点(LIST 0 0)存入变数CEN,半径(50)存入变数RAD中2 使用COMMAND函数执行AutoCAD内建指令CIRCLE,并以变量CEN(圆的中心点)及变数RAD(圆的半径)回应3 与第2行大致相同,但在指定其半径时,先将储存半径的变量加30,使划出半径为80的圆;注意最右边的关括号,与第1行DEFUN左边的开括号是一对的启动文字编辑器,开启TEST.LSP程序文件,复制2CIRCLE至新程序2C,并改为传入自变量方式执行;程序代码如下:(DEFUN 2C (CEN RAD) (COMMAND CIRCLE CEN RAD)(COMMAND CIRCLE CEN (+ RAD 30)))---- 输入后以纯文字格式存盘---- 在AutoCAD绘图模式的指令行提示后,用LOAD函数将程序文件重新加载---- 在指令行提示后,输入程序(函数)名称执行COMMAND : (2C (LIST 0 0) 50)第4节--------------------------------------------------------------------------------批注单行批注分号;表示在分号右边(同一行)的字符均为批注,程序执行时会将其忽略多行批注;| |;表示在两个批注符号中间所有字符皆为批注,即使字符跨越多行关系运算在各个关系运算中,都会传回一逻辑值;若关系成立,传回T,否则会传回nil各参数可以是字符串,整数或实数型态;若以字符串进行比较,则会以字符串的ASCII码为准若函数中只有一个参数,传回值恒为T等于函数(= 参数1 [参数2 ....] )会将参数1与其后各个参数比较,若全部相等则传回T,否则传回nil e.g. (= 2 2.0) Result : T不等于函数(/= 参数1 [参数2 ....] )若参数1不等于其后任何一个参数,即传回T e.g. (/= 1 2.0) Result : Te.g. (/= "a" CHR(65)) Result : Te.g. (/= 10 30 40 10 20) Result : T小于函数(< 参数1 [参数2 ....] )各参数顺序以2个为一组比较,若各组左边的参数均小于右边的参数,即传回Te.g. (< 1 2) Result : Te.g. (< "a" CHR(65)) Result : T大于函数(> 参数1 [参数2 ....] )各参数顺序以2个为一组比较,若各组左边的参数均大于右边的参数,即传回Te.g. (> 1 2) Result : nile.g. (> "a" CHR(65)) Result : nil小于或等于函数(<= 参数1 [参数2 ....] )各参数顺序以2个为一组比较,若各组左边的参数均小于或等于右边的参数,即传回Te.g. (<= 1 2) Result : Te.g. (<= 2 2) Result : Te.g. (<= "a" CHR(65)) Result : T大于或等于函数(>= 参数1 [参数2 ....] )各参数顺序以2个为一组比较,若各组左边的参数均大于或等于右边的参数,即传回Te.g. (>= 1 2) Result : nile.g. (>= 2 2) Result : Te.g. (>= "a" CHR(65)) Result : nil第5节--------------------------------------------------------------------------------逻辑运算且运算(AND [表达式....] )若各表达式的传回值均为T,函数即返回T 值;若其中一个传回值为nil,函数传回nile.g. (AND (< 1 2) (> 8 5)) Result : T或运算(OR [表达式....] )若各表达式的传回值均为nil,函数即返回nil 值;若其中一个传回值为T,函数传回Te.g. (OR (> 1 2) (> 8 5)) Result : T否定运算(NOT 表达式)若表达式的传回值为T,函数即返回nil 值;相反若表达式传回值为nil,函数传回T 可用于检查传回值是否为nil另有一NULL函数与NOT函数功能相似e.g. (NOT (< 1 2)) Result : nil练习(Exercises)COMMAND : (= (- 50 25) (SQRT 625)) Result : T设计一简单程序(名称为AIR),在呼叫程序时,检查传入的数值自变量(为空气污染指数)是否大于200(即严重空气污染)---- 启动文字编辑器,开启TEST.LSP程序文件,输入下列程序代码:(DEFUN AIR (NUM) (> NUM 200))---- 输入后存盘(纯文字格式)---- 在AutoCAD绘图模式的指令行提示符号后,使用LOAD函数重新加载程序文件COMMAND : (LOAD "C:/TEST")---- 在AutoCAD绘图模式的指令行提示符号后,输入自定函数名称及参数执行COMMAND : (AIR 175) Result : nilCOMMAND : (AIR 215) Result : T四流程控制第1节--------------------------------------------------------------------------------条件判断是利用条件函数,配合关系及逻辑运算所设定的一些准则,令程序自行分析,因应情况作出适当行动.单一条件(IF 条件表达式是表达式[否表达式] )函数先检查条件表达式,若其传回值为T,便会执行其后的是表达式若有提供否表达式,且条件表达式的传回值为nil,函数将不会执行(跳过)是表达式而执行否表达式若没有提供否表达式,且条件表达式的传回值为nil时,函数将不作任何事情IF函数可以巢状方式嵌套,即在是或否的表达式中加入另一个IF函数练习(Exercises)判断空气污染指数: 大于100 = Very High, 51至100 = High, 26至50 = Medium, 25或以下= Low---- 启动编辑器,开启C:/TEST.LSP程序文件;新增AIR-1自定函数,程序代码如下:(DEFUN AIR-1 (NUM) (IF (> NUM 100) (PRINC "Very High"))(IF (AND (> NUM 50) (<= NUM 100)) (PRINC "High"))(IF (AND (> NUM 25) (<= NUM 50)) (PRINC "Medium"))(IF (<= NUM 25)) (PRINC "Low"))(PRINC))程序说明1 设定函数名称,并将数据存入自变量NUM内;用IF函数判断变量NUM是否大于100;若是则显示字符串Very High响应2 用IF函数判断变量NUM是否大于50且(AND)小于或等于100;若是则显示High响应3 用IF函数判断变量NUM是否大于25且(AND)小于或等于50;若是则显示Medium4 用IF函数判断变量NUM是否小于或等于25;若是则显示Low5 是一个没有提供任何自变量的PRINC函数;用以抑制显示答案时尾部符加的nil 或重复的传回值;而最右一个关括号,是用以对应第1行最左边的开括号IF函数的巢状练习: 修改上一课的程序练习,将多个IF函数合并成巢状嵌套---- 启动文字编辑器,开启C:/TEST.LSP程序文件---- 新增程序AIR-2,其程序代码如下:(DEFUN AIR-2 (NUM) (IF (> NUM 50) (PRINC (IF (> NUM 100) "Very high" "High"))(PRINC (IF (> NUM 25) "Medium" "Low")))(PRINC))程序说明1 设定函数名称,并将数据存入自变量NUM内;用IF函数判断变量NUM是否大于50;若条件成立(变量NUM大于50)时,再用另一个IF函数判断变量是否大于100;若条件成立(变量NUM大于100)时,使用PRINC函数显示字符串Very High,否则显示High2 若在第1个IF函数判断中,条件不成立(变量NUM不大于50)时;再用另一个IF函数判断变量是否大于25;若条件成立(NUM大于25)时,显示字符串Medium,否则显示字符串Low3 是一个没有提供任何自变量的PRINC函数;用以抑制显示答案时尾部符加的nil 或重复的传回值;而最右一个关括号,是用以对应第1行最左边的开括号注意:第1行最后一个关括号是对应前面的PRINC函数,尾2的关括号则是对应IF函数(判断NUM是否大于100)第2行最后一个关括号是对应第1行的IF函数(判断NUM是否大于50),尾2的关括号则是对应PRINC 函数,尾3的关括号则是对应IF函数(判断NUM是否大于25)最右边的关括号是对应第1行最左边的开括号PROGN 函数在以上各范例中,执行的表达式均为单一的函数运算;若要在表达式中顺序执行一连串的函数,便要将各函数包含在一个PROGN函数内;函数的传回值会是该PROGN函数中,最后一个表达式的运算结果---- 修改TEST.LSP程序文件的AIR-1程序,第1个IF函数如下,其余的IF函数请自行修改e.g. (IF (> NUM 100) (PROGN (SETQ DISP "Very High") (PRINC DISP)))注意: 最后一个关括号是对应前面的IF函数(判断变量NUM是否大于100)尾2的关括号是对应PROGN函数(用以包含SETQ及PRINC函数)尾3的关括号是对应PRINC函数的第2节--------------------------------------------------------------------------------条件判断多重条件(COND [ (条件表达式是表达式) ....] )函数会顺序检查各条件表达式;直到其中一个条件成立(传回T),即执行该条件式所对应的是表达式每个条件表达式只对应一个是表达式,而没有否表达式若条件式成立且执行对应的是表达式后,则不会再对余下的其它条件表达式进行检查若只有条件表达式而没有对应之是表达式,则只会传回条件表达式的逻辑值若没有提供任何条件表达式及是表达式,函数传回值恒为nil练习(Exercises)新增程序AIR-3,以改善上一课AIR-1程序;用一个COND函数判断多个条件表达式DEFUN AIR-3 (NUM) (COND((> NUM 200) (PRINC "Severe"))((> NUM 100) (PRINC "Very High"))((> NUM 50) (PRINC "High"))((> NUM 25) (PRINC "Medium"))((> NUM 0) (PRINC "Low"))(T (PRINC "Cannot Check")))(PRINC))程序说明1 设定函数名称,并将数据存入自变量NUM内;用COND函数进行多重判断2 判断变量NUM是否大于200,若条件成立,则显示Severe 讯息;第3至6行依此类推7 注意条件式为一个T 字母,表示条件式恒为真(成立),显示讯息Cannot Check作用是当以上各条件式均不成立时(变量小于或等于0),即执行此一表达式第3节--------------------------------------------------------------------------------循环(Loop)配合条件判断,关系及逻辑运算,令程序不断重复一些动作,以提高效率及减少重复动作时的人为错误可以多个循环形成巢状(嵌套式)循环,即在一个循环内嵌套另一个(或多个)循环指定的重复次数必须为正整数,亦可以是储存正整数的变量名称重复指定次数(REPEAT 重复次数[表达式....] )e.g. (REPEAT 10 (PRINC "David")) ;重复显示David字符串10次重复(WHILE 条件表达式[是表达式....] )若条件表达式的传回值为T,即会顺序执行函数内各表达式各表达式顺序执行完后,程序会返回函数的开头,重新检查条件表达式的传回值若条件表达式的传回值为nil,函数内各表达式将不会被执行e.g. (SETQ COUNT 1) ;将1存入变数COUNT(WHILE (<= COUNT 10) ;WHILE函数并检查变量COUNT是否<=10(PRINC "David") ;若条件成立则以PRINC函数显示David字符串(SETQ COUNT (1+ COUNT))) ;变量COUNT递增1,并将新值重新存入变量COUNT中取代原值注意: 第4行最右边的关括号,是对应第2行WHILE函数的开括号无限循环又称为死循环,即循环的条件判断式传回值恒为T,令循环不断重复而无法结束;在上例中:---- 若WHILE函数的条件表达式设定为(T) ;即条件永远成立---- 不作SETQ函数,或不将变量COUNT递增;变量COUNT储存值恒久不变,导致条件式永远成立第4节--------------------------------------------------------------------------------练习(Exercises)编写一程序SUM并将自变量存在NUM变量内,计算1+2+3+4 ....至变数NUM的总和(DEFUN SUM (NUM) (SETQ COUNT 1 TOTAL 0)(WHILE (<= COUNT NUM)(SETQ TOTAL (+ TOTAL COUNT)COUNT (1+ COUNT)))(PRINC TOTAL) (PRINC))程序说明1 设定函数SUM并将自变量存入变量NUM,设定变量COUNT以将数目由1开始递增,变量TOTAL(储存总和)初始值为0。
1 IntroductionUpdated 2005-01-26This document gives a few examples how LspCAD 6 is used in a real situation. This document is meant to expand with more examples as time goes by. All the examples are available as project files in the examples folder.2 An optimization example, a two waycrossoverIn this example we have a simple two-waycrossover (Two way tutorial 1.lsp).We see that L1 and C1 only affect theresponse of the Bass unit. Open up theadvanced settings for L1.Check the Optimize box and also the boxnext to “Bass”.We have now instructed theoptimizer that L1 should beoptimized when we start tooptimize the response of the Bassunit. Do the same with C1. In asimilar way we see that C2 and L2only affect the response of theTreble unit. (Two way tutorial2.lsp)Open the Optimizer, we choose tooptimize the response of the Bassunit, we therefore click on the box next to “Bass”, if we look at the schema we will see that the component text for L1 and C1 has become boldface.Click on the Range tab and set the Include range to theinterval 100 to 6000Hztarget for the optimization, click onthe Target tab and then on the LPtab, check the Enable box and setFc to 2000Hz and order to 2, alsoset the alignment to Linkwitz.With this we are ready to start ouroptimization.Click on the Start button and watchthe miracle happen. Optionally onecan turn up the step size to get afaster convergence. When the stopthe optimization L1 and C1 areroughly 0.160mH and 39uF and themean error is close to 0.01dB.For some reason it is possible thatone did not like the result, theremedy is simply to click on theUndo button to get back to the state before the Start button was clicked.optimize the response of the trebleunit for a 2nd order HP Linkwitzalignment at 2000Hz, but insteadwe test what the lock XO option cando for us.We check “Treble” in the optimizetab, also wee set the target to flat,and the range to 100 to 20000Hzand the optimizer screen looks likeAfter a while we have a crossover with a flat system response and a crossover frequency locked at2000Hz. (Two way tutorial 4.lsp)3 A closed box… and a bass reflexboxAt first glance the modeling of various loudspeaker boxes might look overly complex, the intention is however that it should be possible to model other, more complex boxes than the standard closed, bass reflex and passive radiator boxes. This section describes how modeling of a closed box is performed in LspCAD, this example is then extended with a bass reflex port.box3.1 ClosedFirst of all we need a signal source and a Loudspeaker unit, pick this from the component tray, we also need to ground one of the speaker terminals (Closed tutorial 1.lsp).In a closed box we have free air infront of the speaker cone. This ismodeled as a Radiation element.Pick a radiation element. This actsa load of the front part of the cone.Behind the code we have a boxand also a load from the air insidethe box. This is modeled with a Boxload and a Box component. Afterthe components are picked andarranged a little on screen (don’tuse too little space) we have aschema that looks something like(Closed tutorial 2.lsp).So far we have been in edit mode, now it is time to enter simulate mode. Said and done, we click on the Simulate tab.In this mode we need to do a few extra things before we are in business.The Radiation component needs to know a little about theloudspeaker unit (such as Sd). For this to happen we click on theRadiation component and a small configuration dialog appears.Click on the dropdown list box below “Ref to…” and select“Loudspeaker unit 1” (nothing else to select by the way). Onceyou have done this you will see a typical 2nd order high passresponse of a closed box in the graph window.We are getting close but we are notquite there yet, recall that the Box loadcomponent models the load behind the cone, for this to happenthe Box load component must also know a little about theloudspeaker unit. Click of the Box load component and set the reference to “Loudspeaker unit 1” as before.Now we are in now in practice done (Closed tutorial 3.lsp). We are free to modify the Box parameters with a click on the Box component. The T/S parameters can be changed via a click on the Loudspeaker unit.3.2 Bass reflex boxBut lets not be lazy, why don’t we just make a bass reflex box?. Enter the Edit mode again and pick a Port component and an additional Radiation component from the component tray. We need aRadiationcomponent as theport is a componentthat radiates intofree air. Theschema then lookslike (Bass reflextutorial 1.lsp).Now we go back toSimulate mode andwe realize that theSPL graph haschanged (we have anotch in theresponse) In orderto get the full picture we need to let the extra Radiationcomponent learn a little of the Port, click on the Radiationcomponent and set the reference to the Port componentWith this we have the ability to simulate a bass reflex box(Bassreflex tutorial 2.lsp).It would be cool however if Fb in the schema displayed the correctvalue. For this to happen the Port must know how large the Box is,click on the Port component and set the reference to the Box. Nowwe get Fb to update whenever we change the port length or the boxvolume (Bassreflex tutorial 3.lsp).3.3 Grouping the box parts together If we group all the components (except the loudspeakerunit, the ground symbol and the signal source) we get anadditional benefit.Enter the Edit mode, select all the components exceptthose mentioned above, right click and select Group. Movethe markers that “carry” the text “Component group” and“Description” a little.Go back to simulate mode.Nice thing now is that if we left click inside the group box(but not on a component. A dialog pops up that displays themost important parameters.(Bassreflex tutorial 4.lsp).templatesthe3.4 UsingThe closed box and the bass reflex box exist as templates, if the templates are used we get an additional nice feature, namely the wizards that help us to get decent values for box volumes and port lengths.First of all create a completely new project. In the main window, click on the project list and locate the Templates. Select page 3 in the templates.Copy the Bass reflex box (and the associated loudspeaker unit and paste it into the new project.Now we must add a voltage source and a ground connection. When this is done. We enter the simulation mode.The references to the loudspeaker unit must be set for the Box load and the Radiation component closest to the loudspeaker unit (this must be done by hand, hopefully not needed in the future).Now that this is finally done we are ableto simulate our beloved bass reflex box.If we right click inside the group we geta dialog that contains a magic wizardbutton, click onthe Wizardbutton and asmall windowpops up thatallows us toselect among a few bass reflexalignments.Select an alignment and click on Apply.(Bassreflex tutorial 5.lsp)4 The Ugly duckling revisitedThis chapter gives an example how LspCAD is used to create an appropriate crossover for the Ugly duckling loudspeakers, first presented at/ugly_duckling.pdf. This chapter should be viewed as a continuation and will also show how the Behringer DCX2496 is configured.4.1 The subwoofer unitThe bass unit is a Peerless XLS 12 assisted by two Passive radiators Driver unit PRManufacturer: Peerless Model: SWR308Sd: 466.00cm2Vas: 139.20l Cms: 4.60e-04m/N Cas: 9.94e-07m5/N Mmd: 162.39g Mms: 166.40g Rms: 5.12Ns/m Fs: 18.1Hz Bl: 17.60N/A Re: 3.50ohm Le: 1.60mH Qms: 3.70Qes: 0.21Qts: 0.20 Pmax: 500.0W Xmax: 25.00mmh: 8.00mm l: 33.00mm Sd: 466.00cm2 Vap: 139.20l Qmp: 15 Mmp: 1000.0g Fp: 6.80Hz Xsus: 25.0mm Fb: 18.9HzThe original cone mass of the PR is 425g, therefore 575g weights was manufactured that was attached to the backside of the PR.In order to model the passive radiator box itis actually a good idea to pick the PassiveRadiator box template that is available inthe Template section. The template sectionis actually a preloaded project that containsready to use templates for a number ofgood to have building blocks. The templatesection is accessed from the topmostdropdown listbox in the main window.Select both the TS driver unit and the groupthat represents the passive radiator box.Right click with the mouse and select Copy.Now go back to your original project andpaste the items you have just copied.In order to get going you need to add avoltage source and a ground connector.With this you are done with the schemaediting, it is now high time to leave the Editmode and enter the Simulate mode. Clickon the simulate tab. If you though that“Gosh-it-looks-ugly” you will hopefully findthe looks better now. There are a fewnumbers here and there, if you don’t likethem you can actually hide them as don’thave much use of them. Look for thesettings menu pick in the main menu anddeselect the Show node numbers checkbox in the dialog that comes up, while we are here we can also set the display range to10-2000Hz. You can then close this dialog.There are a few thick gray lines runningacross the schema. These lines only showthat all components are referenced correctlyto one another the latter is a key feature inLspCAD 6 and makes it possible to addsemi intelligent wizards in an otherwisestupid node analysis algorithm. These gray lines can be hidden, click eg on the ABR component and deselect the Show references checkbox.The whole thing looks done, except for the fact that we need to enter the TS parameters, click on the TS driver symbol (the large box with the text Blinside). In the dialog that pops up you can enter/modify alot of parameters. First of all click on the Parameters tab.Here you should add all the parameters you haveavailable.If we go back to the T/S parameter list we see that Sd =466cm2. Said and done we enter 466 in the Sd field, to dothis we first double click on the Sd row, then we enter 466and click outside the enter box. Before we go on and enterVas we check the small checkbox that is immediately tothe left of Sd, with this done Sd will stay fixed when weenter the rest of the parameters. When we have entererLe we see that all necessary parameters of theparameters have been entered. The important parametersfor the computations in LspCAD 6 are: Re, Le, (Reb, Leb),Rms, Mmd, Cms, (LambdaS), Sd and Bl. The parametersin parenthesis are not critical. Once we are done the listlooks like the one to the left.Important to know is that the TS parameter list must besaved separately, this is quite natural as one might needthe same TS parameters foranother project.Now we should concentrate onthe frequency response. If welook on the graph we realize thata cutoff of 60Hz is lessimpressive given that we dealwith an expensive long strokesubwoofer.Click on the passive radiator component. Here we should first setSd to 466cm2. As we use a passive radiator that has the samecone area as the subwoofer. Here we actually should enter thevalues that we find in the table some pages ago but lets havesome fun with the group properties first!.Click inside the dotted box with the right mouse button. In thedialog box that pops up we find a Wizard button. Click on thewizard button and then on apply and Viola we have anoptimally flat alignment for the subwoofer with a boxresonance frequency of 37Hz. Close the wizard box.Now click on Clone. Then change the volume to 40l. Now goto the dropdown list box and click on the arrow. Here you willfind that there are two group entries, you can actually switchbetween the old entry (with 18l box volume) and the newentry with just a mouse click. Take the chance to look at thegraphs when you select between the entries. Feel free tochange the name Clone – Passive radiator box to somethingbetter…Now it is high time to get back on track again. We open up thepassive radiator dialog box and enter the values we found in thetable. Note that there are actually two passive radiators. Enter thevalues in the same order as they listedin the table.We also need to set the boxvolume tothe correct value.We need to set the relative locations of thesubwoofers and the passive radiators in orderto get a reliable simulation. As we have thetreble unit as reference point we need to setdX = 150mm, dY = -730 and dZ = 180mm.Click on the radiation component (looks likethe letter R) that is closest to the TS driver andenter the information.For the passive radiators we enterdX = -150, dY = -730 and dZ = 180 anddX = 150, dY = -430 and dZ = 180 (click on the radiation component that is closest to the passive radiator component.The graph begins to look likethe simulation we see in theugly duckling. One exception ishowever the lack of the bump at100Hz. To model this we openup the TS driver dialog againand click on the Configurationtab. Here we find a box with thename Inductance simulation.This is Off by default but can beset to two active modes.Load impedance only:In this mode we get almost thesame response as in the olderLspCAD 5.25 simulation.SPL and load impedance. This models the impact on the power response, actually it makes more sense to model the power response as the subwoofer is actually side mounted so we simply select this mode.The colors look quite dull so we take chance to modify these (click on the tiny rectangular boxes in the graph). Also we click on the generator in the schema and set the voltage multiplier value to 2.83.With this we are done withthe subwoofer part for theugly duckling. If you want tosee an overview of theproject, click on the smallarrow down symbol on thelower left corner of the mainwindow.The project so far is savedasugly duckling 1.lspin the examples folder.4.2 The midrange and the treble unitWe continue using the same project andadd the midrange and treble units. It ishowever a good idea to put thesecomponents on another schema page,therefore click on the small dropdownlistbox that is located in the upper leftcorner of the schema.First of all we put the driver units on theschema. This is quite straightforward.As we onlywish to seethe midrange and treble units for the moment we open upthe settings dialog and deselect the Peerless SUB, and theABR PR from both the listboxes in the SPL field in theSPL/Xfer tab. We can also set the display range to 50Hz-20000HzNext step is to import the SPL andimpedance data for the midrangeand the treble units. The midrangeactually consists of two unitsconnected in parallel. The locationsof the midrange units aredX = 0, dY = 120 and dZ = 0 anddX = 0, dY = -120 and dZ = 0.For the treble unit we set dX=dY=dZ= 0.Before we do anything else we recall that we verified thatthe dZ offset was set correctly in the old ugly duckling. We can actually do the same thing in LspCAD 6. For this purpose we open up the settings dialog again and select the SPL/Xf er tab. In the bottom of this tab we have the option to import a reference curve. We import this reference curve and also in the Show box we check the reference curve. As this reference measurement was done at 80cm distance we also need to set the distance to 80cm in the General tab.In order to protect the treble unit in this reference measurement a 33uF was put in series with the treble unit. Therefore we also need to break up the schema and do the same thing.With this done we can have firstlook at the SPL graph. We can see that we need to adjust the offset of the reference up by 2dB to match the simulated response. Still there seems to be a misalignment between the treble and the midrange units.In the older ugly duckling project we adjusted dZ for the treble unit in order to get a good match and we also see here that dZ = 3mm we get the best match.With these adjustments we can start doing the crossovers it is however advisable to set thesimulation distance to 3m and deselect the show reference curve.The project so far is stored as ugly duckling 2.lspin the examples folder.The real ugly duckling of today use theBehringer DCX2496 digital crossover.Also a 15uF capacitor is in series with thetreble unit to protect from possible poweron transients. Modeling crossovers forthe ugly duckling can be done in manyways. One alternative is to use the G(s)G(z) component but as the DCX2496 isactually used in this case we pick theDCX2496 components here. With thenecessary components inserted into theschema we get the looks to the right.It is a good idea to waste space as it maybe needed later. The observant eye maysee the small buffer amplifiers, there areneeded as the DCX components cannotdirectly drive the driver units, neither inreality nor in LspCAD 6.For the midrange we need to determine what kind of filter blocks we need. After some thinking we need roughly:2nd order HP filter 100Hz3rd order LP filter 3000HzA shelving filter for the baffle step compensationA notch filter for the 8200Hz resonance peak.First we deselect Treble from the Combine and Show list box so we can concentrate only on the midrange.The first, unoptimizedattempt is shown to the left.The project so far is storedasugly duckling 3.lspin the examples folder.With this it is time to optimize the response of the midrange, as target we select 4th order Linkwitz-Riley response with 120Hz and 3500Hz.In the settings for the midrange filter weneed to set the optimizer to optimize theparameters of the filter, (cutoff frequenciesfor the LP/HP filters, gain, Q and centerfrequencies for the EQ’s). Also we need toenable the optimization. It is moreconvenient here to not include the 8100HzEQ in the optimization.In the crossover optimizer we firstselect that we wish to optimize themidrange response, also we set therange to 70-6000Hz.When one click on the Start buttonone may experience that theoptimizer is slow. The reason to thismay be that we have too manyanalysis points. A way to increasethe speed is to set the working rangeto a more limited range and decreasethe number if analysis points,another means is to select the FastIteration in the Other tab.After the optimization we have a midrange response that follow the target pretty well.The project so far is storedasugly duckling 4.lspin the examples folder.The treble filter isoptimized in the samefashion as the midrangefilter, the resulting trebleresponse optimized for aLinkwitz Riley 4th orderalignment is shown to theright.Seeugly duckling 5.lspin the examples folder.The combined midrangeand treble response can befound in ugly duckling 6.lsp. Looking closer at this response (not shown here) one can see that the response is not entirely ruler flat also there is a peak at 6500Hz, not large but it would be neat to get rid of this. Also it looks better it we add 90dB scaling to the imported SPL data. If we add a dip at 6500Hz and run an additional optimization we get the summed midrange and treble response below (see ugly duckling 7.lsp).4.3 The subwoofer unit (again) and tyingthings togetherAfter this is done it is hightime to add the subwoofer ,the signal to the sub needs tobe LP filtered, for this purposewe use a Behringer crossovercomponent as well. This isconfigured as a 2nd orderbutterworth filter with cutoff at119Hz.The resulting on axisfrequency response isshown to the right. In thiscase no additionaloptimization is done (seeugly duckling 8.lsp formore graphs).Also worth a look is thetransfer function. This willbecome handy when wewish to create a passivecrossover later on.The response in the lowfrequency region dropsapproximately 4dB peroctave. This is good when the loudspeaker is in a normal listening room, one can always EQ it with a shelving EQ and get the response simulated in ugly duckling 9.lsp, this does however sound “too much” in the very low frequency region and can sometimes become really unpleasant4.4 Doing the passive crossoverDoing passive networks is a tedious task. One reason is that the load impedance is complex, this can however be fixed with shunt circuits such as zobel and series resonance circuits. The other problem is that unlike e.g the Behringer XO where one can set the slope of a LP filter and the shape of an EQ , everything in a passive XO is tied together. For instance if one change a component that is supposed to affect the slope of the highpass part of a bandpass filter, chances are pretty high that the lowpass part is affected as well. In short, what is easy done with active XO’s can drive you crazy if implemented as a passive crossover.But lets stop whining. This section described how a passive crossover is constructed for the midrange and treble section. The subwoofer is omitted, is anyway bad practice to construct a passive crossover for a subwoofer as the components can in the end be more expensive than buying a power amp and run the subwoofer actively.First we open the project ugly duckling 9.lsp. To makethings easier with the construction of the passivecrossover we export the transfer function of themidrange and treble unit filter, this is done from thegraph window. Click on Export. In the dialog we selectthe Midrange transfer function and click on Export. We save the file asugly duckling midrange TF.txt in the examples folder. Do the same with the treble unit transfer function.This makes it possible to optimize the transfer function of the passive crossover to the same target, slightly more simple than having to optimize frequency response all over again, also it is used in this tutorial to show the possibilityOne observation worth notice here is that the gain for the treble filter is 1.8dB, this means that we would need to attenuate the signal to the midrange in a passive filter. Personally I don’t like this so we need to fix this.After this we remove the subwoofer and all the other components except the midrange and treble unit driver from the schema.Our first task is to make the impedance curves of the driver units more flat, this is of great help in our strive to achieve a good passive filter.In ugly duckling passive 1.lsp a series resonance circuit is used to reduce the resonance peak at 70Hz while a zobel is used to cancel outthe impact of voice coil inductance. Also in this case themidrange is change to a configuration with the two midrangeunits is series. This reduces the sensitivity of the midrangebut makes it easier to match the sensitivity of the treble unit.For the treble unit we settle with a zobel network just to fixthe voice coil inductance.Note that the series resonance component is a groupedcomponent with wizard properties. This means that one canright click inside the dotted frame and click on Wizard in thedialog that pops up. In this wizard one can set the centerfrequency (fo),the Q value and the minimum impedance ofthe series resonance circuit, when Apply is clicked theappropriate components are computed.After some tweaking with components (actually it is possible to use the optimizer for this). We get the initial passive crossover show to theright. The resulting impedance is shown below.The impedance is not totally flat but it is not critical to get it 100% flat as we may anyway use these components when we optimize the transfer functions of the filters. The resonance peak at 600Hz may cause some problems for us when we start to tweak the transfer function of the treble unit but lets hope for the best…The project so far is stored asugly duckling passive 1.lspin the examples folder.Now it is time to add the actual crossover components. Forthis purpose we can add a HP/LP filter with a right button clickon the mouse (in Edit mode of course).As a starting point we select a 2nd order HP filter with cutoff at120Hz and a 3rd order with cutoff at 3500Hz. The nominal loadis set to 12ohm. When we click on create a crossover isdropped on the schema, we move it to an appropriate place.Perhaps not necessary but good anyway is to make sure that the very aggressive peak at 8500Hz is attenuated as much as possible. Therefore we put aseries resonance filter as a shunt across the driver terminals (getthe wizardized group from the templates this time also). Whenwe enter Simulate mode we right click on the series resonanceand configure it so that we get a sharp notch at 8500Hz.The crossover begins to look like something useful.The frequency response isless charming though. Wecould run hog wild trying tooptimize the response butit would probably fail as wedo not have anything thatcan compensate for thebaffle step. The existingcomponents may do thisjob to some extent butmost likely it will not work100%.The project so far is storedasugly duckling passive2.lspin the examples folder.In order to get something that can handle the baffle step we add a parallel inductor and a resistor in series with the input to the crossover.Now we tag all the components belonging to the midrange crossover (except the components that belong to the series resonance and zobel circuits) for optimization. Earlier we mentioned that we should optimize the transfer function of themidrange crossover. The figure to the right we can see what it looks like forthe component L4.Next we need to measure the transfer functions of themidrange crossover if we look at the schema we see that theinput to the filter is connected to node 1 and the midrange isconnected to node 2 . We open the Settings dialog andclick on the SPL/XFER tab we can set the node difference tobe computed as the voltage ratio between node 2 and node1.We open up the Optimizer and select Transfer function inthe Optimize tab.As target we select the file that we exported from our digitalfilter project. The Range is set to 70-6000Hz.When the optimizer is open thecomponents that are selectedbecome boldface, it is good practiceto have an extra look at the schemato verify that the right componentsare optimized before Start is clicked.Once the optimization is done we have the midrange crossover and the response below.This looks pretty good or ??The project so far is stored asugly duckling passive 3.lspin the examples folder.The treble unit is treated in a similar way as the midrange. Here a 2nd order HP filter is combined with an attenuator. One special problem with the treble unit is that a dip at 4700Hz needs to be equalized. This is a no-brainer with an active crossover but with a passive crossover some extra brain cells are needed. In this particular case a parallel resonance circuit was incorporated in the attenuator circuit that serves to reduce the attenuation at the resonance.After some optimization a flat response was achieved one problem though was that the impedance was a mere 2.8ohm at 20kHz!.This must be taken care of. Therefore we run an additional optimization runwith impedance constraint. For this purpose we tag all the components thatbelong to the treble network for optimization (see example to the right).There is no need to touch the midrange components as we see that theydon’t cause any impedance problems.When we run our optimization of thecombined midrange and treble response weset the range to 250-16000Hz as we don’twant the roll off to disturb the optimization.One special feature we use is thatwe lock the crossover point to3600Hz, thus we ensure that thisXO point wont move when we hitstart.In the Zmin tab we set the initialMin Z value to 3ohm. Then weclick on Start.As the optimization is running weclick in the MinZ field and increasethe value with the “Arrow up” keyon the keyboard. Increase thisvalue with care, if you increase tofast the optimization may FUBARand you need to stop and undothe optimization, the restart againfrom a low Min Z. After a whileyou have reached 4.2ohm, whichis considered good enough.The project so far is stored asugly duckling passive 4.lspin the examples folder.。