^C^C_setenv;plot_to_0=ploter_1=PDF_2=file;\-plot;n;;;$M=$(if,$(eq,$(getenv,plot_to_0=ploter_1=PDF_2=file),0),;,$(if,$(eq,$(getenv,plot_to_0=ploter_1=PDF_2=file),1),"DWG To PDF.pc3";,$(if,$(eq,$(getenv,plot_to_0=ploter_1=PDF_2=file),2),PLT;,^C)));n; 因此,纸张大小实际上会根据输出设备的不同而变化,这是否意味着您确实有一个用于所有变化的命名页面设置。 这是正确的-每个变体都有一个命名的PS。这花了一段时间,但知道我们在绘图制作方面遇到的问题——这是值得的。 好的,首先谢谢你提出这个问题,它让旧的灰质起作用了。
试试这段代码,它无疑会失败,但这是一个起点,这确实对您有一些要求首先,对于每个页面设置名称,创建一个新的层,并将其完全相同的名称(如果您有空间,它可能不起作用),在每个布局上放置3个多行文字项,文字“plot”“pdf”“plt”。更改每个文本的层以匹配该特定布局的页面设置。我只做一个布局和三层作为测试。如果可行,您可以在以后的所有设置中创建一个模板文件。
下一步,试着设置macrotrace=1,然后运行这个宏,如果它工作正常,那么在运行它之后就不会这样了。复制命令历史记录并发布在这里。
当宏运行时,它应该暂停-此时您需要根据需要的设备单击其中一个文本项-它使用层名称来 Haven't used "setenv" "temp" etc. before. It's a whole new world to explore
1) the code works
2) unfortunately only on LT (I'm using full ACAD myself and some of my collegues are as well)
3) spaces do cause a problem (ACAD interprets it as "enter")
4) for pdf and plt I would suggest adding "~;" at the end of the code, just before last "n" (that brings up the "Save" dialog box)
^C^Csetenv;temp;$m=$(getvar,clayer);laymcur;\setenv;temp1;"$m=$(getvar,clayer)";clayer;"$m=$(getenv,temp");-plot;n;;"""$m=$(getenv,temp1)""";;;~;n;
If this was only the first step, I'm ready to hear out the next one. If this was the final solution, I must admit that it's not what I was looking for. I don't want the user to make any other choices but the file name and final question about plotting after the user has pressed one of the buttons (plot/create pdf/create plt) Yay +1 for LT, apparently that is an LT only option, usually it's the other way round. I'm sorry if this option is a bit disapointing for you, the basic concept is all I can think of, getting it to work is just tidying up. I have scratched my head over this but can't think of anything that is based in the layout that could be used to read information into a macro even using the setenv command the variable is not locked to a layout, even creating a load of macro's for each PageSetup there isn't a way that I know of, to make a macro layout based. And diesel just doesn't have the descision making capabilities of LISP. The question still remains open though, how did you see the user choosing between the different output devices, you mentioned an attribute or text, but they would still somehow have to set that up first before printing, would that be done manually or by editing. The attribute or text would be loaded (imported) with the layout from template. So no problem with that.
If only it was possible at some point in the command string to say "please read and use the value of attribute called "pdf"" the problem would be solved.
Hopefully there is an answer out there. I will post it here if I find it.
Thanks for the work you have done looking for a solution! I have 7 different plot settings in a menu you say your using Autocad so each of these just has a different plotter set up for the same size title block. In one place I worked at we had two title blocks ours and a government authority title block slightly different sheet settings so just had two macros not rocket science.
For code http://www.cadtutor.net/forum/showthread.php?69132-Printing-LISP-Help...&highlight=Printing-LISP
页:
1
[2]