DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

how to use sys(11)

Started by bdeck, January 23, 2007, 05:29:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bdeck

As the macro posted in the link below shows, I'm having trouble using sys(11) to set the print scale.

http://forum.designcad.com/index.php?topic=216.0

Any Ideas?

Thanks

BD

prl

>PrintCurrentView
{
}

does automatic scaling.  It doesn't read sys(11).

Lar

bdeck, maybe you have to do it the way I do it manually when I want to use Print Current View: do a Print setup first, without actually printing, then do the Print Current View...

Where you have:
INPUT "Input print scale factor.    0 to fit page,   999 for prior setting", sf
if sf<>999 then sys(11)=sf  ' set print scale factor

maybe you should have:
>Print
{
}

This would open the Print command dialog box. The user will just have to set the scale then close it without printing (click 'Close' instead of 'Print').

Either that or just keep the Paste selected and then do the >Print. The user (or the macro) will then set 'Selected Only' and whatever other options he wants, then Preview and print.

Sorry, I don't have time to test my suggestions right now to see if they work.

Lar

bdeck

#3
Hello Lar,

I used half of your suggestion in a revised macro:

http://forum.designcad.com/index.php?topic=225.0

I found that opening a new temp drawing had some definite advantages for printing.
   1) Less code.
   2) Allows temporary change of printer settings without restoration code.
   3) Seems to work pretty well in 3d.
   4) Works in prior DC versions (PrintCurrentView does not)
   5) Does not require special handling of previously selected objects on parent drawing.
   6) Basiccad's inability to detect an escape from SectionCopy is compensated by the cancel key in the print dialog.
   7) Close command replaces a pile of cleanup code.

The method has only 3 shortcomings as far as I can tell.
    a) SectionCopy does not cut through images, so partial images are not printed. With some fancy layer manipulation, a sharp coder with plenty of time could do a combined SectionCopy and ImageCopy, but that's an area where I think a new feature is warranted. (I'm beginning to see things from CJ's point of view)
    b) Calling print preview in the temp drawing from a macro fails.
   
I like the ability to use temporary  drawings and layers in a macro.

What do you think about having dedicated scratch layers (perhaps numbered -1,-2,...) for doing construction from macros? The ability to draw to an invisible scratch layer would eliminate the need to regen the drawing after the macro or to do construction at offscreen xy offsets. The layers would not  persist, so they would not have to be erased. Havent thought it through completely.

I'd like to put prl's polygon mask on a dedicated scratch layer. His masking method appears to offer a good solution for printing combined vectors and images. But that again is something that really belongs in the program.

BD

Lar

Section Copy doesn't cut through Text, Hatches and a couple of other things too.

To be honest with you one of my printers needs ink, another isn't loading paper and I don't do test prints on the plotter (it has to be a real print). So, until something breaks (or should gets fixed) I won't be able to test the macro. Hey, I forgot all about pdf's... I'll give it a wiz and report back.

Lar