News:

Please note new Forum URL: forum.designcad.com

Main Menu
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.

MACRO TO SET UP PRINTER

Started by SFA, July 15, 2013, 10:55:14 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Each Paperspace tab should have its own printer setting (saved with drawing)!

Essential new feature!
3 (42.9%)
Good idea!
4 (57.1%)
No interest in this.
0 (0%)
Better as it is now.
0 (0%)
Stupid idea!
0 (0%)

Total Members Voted: 7

samdavo

#15
I had a macro once - way back in 2000.
It printed to black and white, lol.
Firstly it changed every colour from my defaults (layer 2 = red, 3 = gold, 4 = green etcetc)
to white;
then printed;
then changed them back to their correct colours based on their layers  :)
I won't bother posting it here.  (You'd have to be real desperate lol).     

PS Just correcting something I said up there, but when I check, there is the option to "Save Print Settings with Drawings" at the bottom of the Print Dialogue Box.  That might help?


samdavo

#16
This comment directed to the clever gentlemen out there - you might know the answer to this one - suppose you try to record a macro called "print settings.d3m".

And suppose the first thing you do is Ctrl+P to open printing diag box
At this point the printer is highlighted,
Then you click the up-arrow a few times to make sure you are at the first printer in the list, which, let's say is CutePDF
(or alternatively you press a single "C" to select that printer)

Then press enter for print.  (or Alt-P)

You haven't used the mouse, just the keyboard -  so ....
Wouldn't you think all those keystrokes would be recorded in the macro?  -
no bludy way, lol.
This is what you are left with when you stop recording and investigate what you've done :-

>Print
{
  }

What happened to recording the other keystrokes?   
Is it the case that keystrokes typed whilst the dialogue box is opened are ignored? (it would appear so).
Sorry- this post belongs on a thread called "elementary programming for dummies for seniors"  -

which , btw, would be a worthwhile thread imo lol.

SFA

As AutoCAD has been mentioned, what it seems to do is retain a different printer set up for each Paperspace. This is much more useful.

The way DesignCAD works is to stick with the latest printing set up.  I usually have one drawing with quite a few Paperspaces so I need to remember to re-set up the printing parameters each time I swap between them. As you can guess, I often forget!

These are the OLE commands I think I might need but have no idea how to use them.

ActivePrinter
DrawingHeight
DrawingWidth
PaperSize
PenWidth
PrintBlackAndWhite


Alternatively as sandavo says, it would be great if the printer settings could be recorded by recording keystrokes in a macro - but I can't get this to work either.

SEMPER IN EXCRETIA

prl

Quote from: samdavo on July 19, 2013, 05:49:35 PM
What happened to recording the other keystrokes?   

Well as you've discovered, DesignCAD doesn't really have a macro recording capability.  It has a semi-automatic BasicCAD programming feature. 

For keystroke and mouse position recording, you may want to consider AutoHotKey or something like that.




samdavo

#19
Here's a macro I find from 2000.   Now, lol, I have no idea if I wrote it, or I copied it :)
(PS believe I wrote it)
At least it sets Area\Fit to Paper,
and also Area\Centred

Pretty useless for what you do. 

'printselect.d3m  - this macro prints all.  For selection only, change manually
' also manually check
'      printer,
'      pen width,  and
'      portrait

'print drwg centred
sys(162)=1

'fit to paper
sys(163)=1

'print selected - NO
sys(170)=0

>Print
{
  }


It needs to have print-black-and-white added (monochrome as you call it), as well as the other things you want. (2 cents)

Quote from: SFA on July 20, 2013, 02:00:25 AM
... so I need to remember to re-set up the printing parameters each time I swap between them. As you can guess, I often forget!

Hey SFA, I used to forget to check settings - and it was a damned nuisance if I subsequently found that a pdf I had printed wasn't correct  eg should have been "print selection only" but wasn't, etc etc any number of ways to screw up as you know / imply.

but this is what I did - call it a self-discipline exercise - the computer macro-whispering to me to mend my ways.

I changed Ctrl+P from Print (i.e. Options ,Q \Keyboard Settings \ turn off Executables \Print)
to a macro (reset keyboard setting for Ctrl+P to this macro we are about to write).   Let's call it printwithwarning.d3m

And this macro simply warns you to doublecheck settings before you print  (dead simple, but it "broke me in" as I say)  :)

'printwithwarning.d3m  - print dialogue box -but reminds you to check settings
Message "Warning. please check settings !!! you dill !!! - especially for Cutepdf!!!"

>Print
{
  }


These days I have deleted the warning, because it's second nature.

PS "call it a self-discipline exercise" - minus the whips of course, lol.  Sado-masochism means never having to say you're sorry , as they say.

samdavo

SFA
Just another observation,  (an alternative to a macro) - I understand that you would appreciate it if "each Paperspace tab had it's own printer setting"  (your words not mine :) )

Whether that ends up on the Feature Requests or not I leave to you or others.  As I say, I get by with what we have - and, whilst I would pay more for some other features, I wouldn't for this one (and I suspect that is what it boils down to in the real world).
Just one opinion of course.
cheers
sam

landonairey

After reading this whole printer thread I'm wondering if anyone knows if you can specify the file name to save a CutePDF print job. And how to execute the print (not just calling >print from the macro which only pulls up the printing menu.

I ask because I often have to batch print dozens of dc files and they're names are too long. So I have to find the full name of the dc file and save the "printed" pdf file as the dc name but with .pdf at the end. It's a huge waste of time

I've tried going the cmd.exe route but no luck with this line to test its functionality:

c$ = "cmd.exe /c cd C:\&&PAUSE&&RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "+chr$(34)+"CutePDF Writer"+chr$(34)
run c$


I'm hoping for something like this out there (I will manually setup the CutePDF printer prior to this in DC)

finalname$ = "C:\TestDone.PDF"
>print
{
   <Filename [finalname$]

}