使用多个外部数据t
首先,我要说我是AutoLISP的完全初学者。我一直在尝试使用AfraLISP上的教程自学这个程序。因此,我成功地使用了Kenny Ramage用作使用DCL对话框和外部数据文件的教程的宽法兰绘图程序,并将其重新编写为绘制150 lb串行ANSI管道法兰平面图的程序。一切都很棒,学到了很多。但我想扩展这个程序来绘制其他类别的法兰——300磅、400磅等等,以及系列B,每个都有自己的数据文件。因此,我尝试添加一行径向按钮,用于使用if语句来选择类别,以使用选定的数据文件,但无法使其工作。不断弹出的错误将DCL文件中的ok\u cancel按钮代码标识为“重新定义对象”。我完全不知所措。由于我是新手,很可能我弄乱了其他一些代码——老实说,我在使用我不完全理解的代码——但我很难得到关于ok\u cancel命令的这个特定错误消息,因为在正在运行的更简单的程序中使用了同一行代码。对于任何有兴趣提供帮助的人,我将随附2个zip文件。lsp。dcl和。dat文件捆绑在运行程序所需的每个文件中。flgface。lsp是工作程序,即FLGFACE测试。lsp扩展版我无法工作。请注意,我在绘图命令行中包括了更改图层命令,以符合我公司的图层约定,因此您可能希望在测试之前删除这些代码行。还要注意,我只为测试程序制作了一个数据文件——A系列150 lb(它与flgface程序是同一个数据文件,只是为了与代码一致而重命名)——只是为了测试程序。FLG表面测试。拉链
FLG面。拉链
嗨,唐,
欢迎来到CAD论坛
某些dcl支架错位(现已修复)
flgface : dialog { //dialog name
label = "Flange Face."; //dialog label
:boxed_radio_column { //define radio column
label = "Type of flange" ; //give it a label
: radio_button { //define radion button
key = "rb1" ; //give it a name
label = "Series A 150#" ; //give it a label
value = "1" ; //switch it on
} //end definition
: radio_button { //define radio button
key = "rb2" ; //give it a name
label = "Series A 300#" ; //give it a label
} //end definition
: radio_button { //define radio button
key = "rb3" ; //give it a name
label = "Series A 400#" ; //give it a label
} //end definition
: radio_button { //define radio button
key = "rb4" ; //give it a name
label = "Series A 600#" ; //give it a label
} //end definition
: radio_button { //define radio button
key = "rb5" ; //give it a name
label = "Series A 900#" ; //give it a label
} //end definition
: radio_button { //define radion button
key = "rb6" ; //give it a name
label = "Series B 150#" ; //give it a label
} //end definition
: radio_button { //define radion button
key = "rb7" ; //give it a name
label = "Series B 300#" ; //give it a label
} //end definition
} //end radio column
: boxed_column { //define boxed column
label = "&Size"; //give it a label
: popup_list { //define popup list
key = "selections"; //give it a name
value = "5" ; //initial value
} //end list
} //end boxed column
ok_cancel ; //OK and Cancel Buttons
:text_part { //Text Label
label = "Designed by Kenny Ramage";
}
:text_part { //Text Label
label = "created by Don Mitchell";
}
}
1.许多setq不平衡/缺少括号(…)
2.列表是受保护的符号
等 谢谢显然,我将不得不花更多的时间在AutoLISP的基础上,因为我正试图使用我并不真正理解的语法代码。我有一个更简单的版本,只使用一个数据文件。我无法让径向按钮选择的多个数据文件工作,可能是因为我试图使用正确的数据文件选择来修改将加载到弹出框中的大小选择列表。有一次,我认为解决方案是在这一部分中使用一个单独的lisp程序,该程序将使用此选择来启动另一个程序——但却发现无法使用一个lisp程序启动另一个lisp程序。我只是很难掌握AutoLISP语法。我发现网上教程和我买的书在这方面严重缺乏。再次感谢你的帮助。
页:
[1]