11
应该是这样的
12 是的,我已经试过了,但对我不起作用 我不完全确定这是否正确,但试着改变一下
10
14 非常感谢德拉诺 我回来了,如果有人感兴趣的话,以上就是工作程序。多亏了Dlanorh&Jef,我才更改了变量名,这样我就不会混淆,并评论了警报,我现在不需要它们。
我也喜欢进一步发展,所以我试着做这样的事情
但由于某些原因,它不起作用,基本上我有一个块,偏移量从0开始,另一个是间距/2,所以如果间距是200,开始偏移量将返回100
最后,为每个块添加层
我做了上面的事情,但例程忽略了它,没有创建层。
再次感谢您的指导,如果我的问题没有意义,请道歉 我可以看到“paramlst”是一个带引号的列表(列表前有一个“'”。这意味着列表中的所有内容都被认为是书面的,你不能在引用的列表中做任何事情。
您需要另一个变量作为间距,然后需要使用“list”构建参数列表
17等
或者,您可以将功能(c:mes)更改为功能
but for some reason it's not working, ...
</blockquote>
If your start offset is always half the value of the spacing, just calculate it. The purpose of an assoc list is to store (all and only) what cannot be calculated in an equation, like the varying arbitrary values of spacing therefore you store it in the list. Once you retrieved it (after the selection by the user), if the offset is always half the spacing value, then just calculate it, ie (setq start_offset (/ spacing 2.0)). Hi dlanorh this looks a bit easier to debug can you show an example how to do this, sorry guys for the last ng thread it’s just I’m not really coder, but I’m trying .
Thank you very much. For your information, this doesn't create what you think it does.
("layer" . (command "-layer" "make" "BLOCK1_LAYER" "color" "1" "" "lw" "0.5" "" "lt" "continuous" "")) If you cut and paste the following into the command line then press return, it will create the layer and set it as current (note that there is an extra return ("") added at the end to close the command).
(command "-layer" "make" "BLOCK1_LAYER" "color" "1" "" "lw" "0.5" "" "lt" "continuous" "" "")
The next line will read "command: nil" It does not return the name of the layer created so what you have in fact created is
("layer" . nil)
This is true of almost all (command ....) calls in lisp.
It is far better to pass in the layer name, extract it then test if it exists, and if not create it.
(setq mylayer (cdr (assoc "layer" mylist)))(if (not (tblsearch "layer" mylayer));if it doesn't exist (command "_-layer" "_M" mylayer "_C" "1" "_LT" "continous" .....);make it and set current (setvar "clayer" mylayer);does exist, make it current);end_if ah i don't know how to proceed anymore at least for now i'll just change layers manually Thanks for your help really appreciate
页:
1
[2]