需要为用户t添加INITGET
我有一段代码,从另一个例程中运行,在我们的图形中插入带有数据点的引线,这取决于您是否在例程中打开或关闭正交,计算该值,并创建引线以及相应一侧的文本。我们的一个同事问我是否可以编辑和创建我们使用的变体,因此当打开正交时,你直接向上拉一个引导者,它会询问用户他或她希望引导者躺在左侧还是右侧。有人能帮我看看吗?我有一种感觉,在我把文本加粗的地方会有变化,但我不确定。在这个例行程序中有相当多的事情发生,所以你可能无法测试,但如果有人愿意帮助,我将很高兴。提前谢谢大家!
(defun get\u info(st\u pt end\u pt lay\u name str1 str2/side p3 p4 inputline dpff nlp lchanged printed linetext placeholder)(if(not(等于p1 p2))(progn(if(<(car p1)(car p2))(progn(setq side“ML”)(setq dir 0.0))(progn(setq side“MR”)(setq dir 180.0))(setq p3(polar p2(dtr dir)(getvar“userr1”))(setq p4(polar p3(dtr dir)(getvar“userr1 R1”))(程序(setq p4 p2)(setq side“ML”))(setq inputline nil)(openfile)(seek tcuit)(while(not(equal inputline st\u pt))(setq inputline(read line infile))(setq printed“N”)(while(not(equal inputline end\u pt))(if(/=inputline end\u pt)(progn(if(=etype“G”)(progn(dpn inputline)(setq dpff txt))(progn(dpn inputline)(setq dpff txt))(progn(dpn inputline)(setq dpff)(atof txt)))(if(=dpnum dpff)(progn(if(not(equal p1 p2))(progn(command)..u line“p1 p2 p3”“)(setq a(angle p2 p1))(command)..u solid“p1(polar p1(-a 85)(getvar“userr1”))(polar p1(+a 85)(getvar“userr1”)))))(command)..u text“side p4(getvar“userr1”)0(getline 1 inputline))(setq lchanged“N”)(setq nLp 2)(而( 我正在做一些事情,但就是不能得到最后的调整了。以下是我所拥有的:
(defun get\u info2(st\u pt end\u pt lay\u name str1 str2/side p3 p4 inputline dpff nlp lchanged printed linetext placeholder)(initget 1“L R”)(setq VO1(getkword“输入TML方向…(L或R)”)(IF(=VO1“L”);(progn(setq side“ML”)(setq dir 0.0))(progn(setq side“MR”)(setq dir 180.0)(setq p3(polar p2(dtr dir)(getvar“userr1”))(setq p4(polar p3(dtr dir)(getvar“userr1”))(progn(setq p4 p2)(setq side“ML”)(setq dir 0.0))(setq inputline nil)(openfile)(seek tcircuit)(while(not(equal inputline st_pt))(setq INPUTLINPUTLE(read line))).)(setq打印“N”)(而(not(equal inputline end\u pt))(setq inputline(read line infle))(if(/=inputline end\u pt)(progn(if(=etype“G”)(progn(dpn inputline)(setq dpff txt))(progn(dpn inputline)(setq dpff(atof txt))(if(=dpnum dpff)(progn(if(not(equal p1 p2))(progn(命令)(polar p1(-a 85)(getvar“userr1”))(polar p1(+a 85)(getvar“userr1”))“”)(命令“.u text”侧p4(getvar“userr1”)0(getline 1 inputline))(setq lchanged“N”)(setq nLp 2)(而( 任何人李? 在“L”的情况下,计算pt3和pt4作为不同的点。在“R”的情况下,你会做一些完全不同的事情。为什么? 罗伊,谢谢你的回复!你的提问让我对代码有了不同的看法。我想出来了!万分感谢!上帝保佑你!!圣诞快乐!
页:
[1]