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 1 Guest 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

SFA

Where can I find the variable names to set up the items in this print box automatically? They must be somewhere!

SEMPER IN EXCRETIA

SFA

No one has replied. Is this request impossible?

SEMPER IN EXCRETIA

samdavo

#2
SFA,
There is a parallel thread something similar to this one.

I notice one of the settings there is "print as black and white" or not as applicable.

Note that DT has said that :-

Quote from: DrollTroll on July 12, 2013, 07:45:26 AM
PrintBlackAndWhite is an option that will be available to both BasicCAD and OLE Automation in version 23.
Presumably that means it will also be possible to print in colour.

Apart from that I can't really help.  Not many SYS functions in that area (i.e. printing) - that I can see anyway.  Personally, I can set all those settings in my sleep lol -  heck I run that gantlet every five minutes 8 hours a day :)
cheers
sam

PS Here is a list of many of the SYS functions ( but there are more as well as SYS$ functions):-

http://forum.designcad.com/index.php?topic=4894.msg31165#msg31165

Personally I'd appreciate if someone could simply add them all on one easy to find thread (and not as an hlp file) - maybe it's there already but if it is I have yet to find it.  Apologies in advance if it's dead simple.   

prl


dcadRob

#4
Isn't SFA the poster who started that older thread?

dcadRob

What exactly are you interested in changing?

prl

Quote from: samdavo on July 16, 2013, 04:03:06 AM
Personally I'd appreciate if someone could simply add them all on one easy to find thread

Sam,  there is a 20000 character limit to topic messages.  That generally prevents us from simply cutting/pasting entire manual/reference sections such as sys() or sys$().

But recall, BobP has been kind enough to put them into pdf format for us.

http://forum.designcad.com/index.php?action=dlattach;topic=4894.0;attach=5321


samdavo

#7
prl, yep sorry, - I have it as hard copy - printed from that pdf obviously , but forgot whence I got it - and was trying to quickly answer SFA with a link - and likewise forgot where to direct him to - apologies all round , incl Bob P.

Back to the printers.  Just thinking aloud ok?
SFA, I concede it is a chore walking the gauntlet.
However, some notes :-

1. It would be great if you could set your printer preferences in Options, or maybe Workspace. (DT?)   That way it would default to your favourite settings.

2. SFA, I notice you use CutePDF.  me too.   Once you open the print dialogue box, (Ctrl+P) ,  the printer choice is highlighted - and a single letter C will select CutePDF.
(provided you don't have a Canon printer I guess :) );

3. then ( I concede) you have to set everything - in my case, SOME DAYS  I have to change between printers fairly often - the works printer starts with "\\server xyz etc"  and a single "\" selects it (as well as the fact it is the default printer also - which is also relevant;   and I print pdf to CutePDF to email something;   or I print hardcopy for the workshop, etc etc - so you're right, it's a nuisance.

But on those less-hectic days when I have a string of prints to the same printer with the same settings it's not that bad.   Once all settings are set, the settings stay put  until you close DCAD:)

4. I've never thought of it, but I suppose you could open two versions of DCAD, and have one setup for one printer and another for another - but that sounds a bit "wet" inefficient lol.

I invariably print black and white, and Fit to Window, sometimes Print Selection Only.  Most/many of those settings (except print black and white) are defaults anyway.

5.  I am fairly sure I'm right, but I don't believe that print settings are saved when a drawing is saved EVEN IF you have "save parameters with drawing" ticked in Options.   Guess  that would be a bit of an improvement if possible to add to V23 as well.
Doh, there is the option to "Save Print Settings with Drawings" at the bottom of the Print Dialogue Box.  I assume it works (??) , albeit only the one setting per drawing ... I personally never use it.

6. Another quick comment, but I invariably check most settings before each printing for the simple reason that I hate wasting paper lol.  And not only do I invariably (second nature) check Area, Paper, Type and "Print Selection Only", but I also check Setup on the right hand side, because our printer doesn't like being sent Letter or Legal size documents, when it is geared up for A4 :) 

I guess in summary what I am saying is that

a. once setup, the print settings run smoothly until you turn off DCAD
b. there are fair few settings to add to that macro of yours - not saying it's not a good idea though.
cheers   

PS . For others to comment further.  I notice someone has already cracked the printer setting by macro. 


DrollTroll

Essentially, BasicCAD doesn't have a way to select the specific printer to be used.
This features *is* available via Ole Automation, so it's likely someone could cobble together a VBScript to set this.
25 years with DesignCAD

SFA

1) Thank you for the short-cut tips. I had not thought of that.

2) We (all of you) cracked the macro selection of the default print (code below) but DesignCAD ignored the default and used its own settings:-

for i = 1 to 4
if i=1 then mac$="cutePDF Writer"
if i=2 then mac$="Send To OneNote 2010"
if i=3 then mac$="PaperPort Image Printer"
if i=4 then mac$="Brother DCP-6690CW Printer"

q$="""
a$ = "/c RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "
b$=q$+mac$+q$

'build the total cmdline string and check it first
total$=a$+b$
message total$

cmdline total$
run "cmd.exe"

next  i

3) Looks like it's going to need Ole Automation and VBScript (whatever they are?).

SEMPER IN EXCRETIA

SFA

This seems to be the OLE command I need to change the printer that DesignCAD will use

DcPrintOption.ActivePrinter = "cutePDF Writer"

That is as far I as have got as I have no idea what to do with this nugget of information.

Can anyone help?


SEMPER IN EXCRETIA

prl

Quote from: SFA on July 19, 2013, 01:50:07 AM
Can anyone help?

It is possible to compile a simple OLE program that sets the printer that you could invoke with BasicCAD, but the questions is, is that all you need?  Remember there are some 40+ different printer properties and trying to create an OLE that is accessible through BasisCAD to set those various settings would require significant time.

Quote
PrintOption Properties

ActivePrinter
Application
DrawingHeight
DrawingWidth
GraphicsAcceleration
HorizontalOffset
PanelOverlap
PaperOrientation
PaperSize
PaperUnit
PenWidth
PlotSortedByColor
PrintArrow
PrintBlackAndWhite
PrintByLayerOrder
PrintCentered
PrintConsiderAll
PrintCopies
PrintDimension
PrintDisplayGrid
PrinterBottomMargin
PrinterLeftMargin
PrinterRightMargin
PrinterTopMargin
PrintFileName
PrintFitToPaper
PrintHeight
PrintLine
PrintOutputFormat
PrintPanelMark
PrintPanelNumber
PrintPanelsOverlapped
PrintScale
PrintSelectOnly
PrintShadows
PrintText
PrintToFile
PrintWidth
PrintXPanel
PrintYPanel
SavePrintSettingWithDrawing
VerticalOffset

dcadRob

Quote2) We (all of you) cracked the macro selection of the default print (code below) but DesignCAD ignored the default and used its own settings:-
After you run the macro, the specified printer is not the default printer in Windows?

prl

In line with what dcadRob is asking, I'm assuming the test code you made cycled through all the printers while you checked things manually at each Message statement.  Obviously if you are using that specific code minus the message statement, the last printer "Brother DCP-6690CW Printer" will be the default printer.

samdavo

#14
So, it seems we need a SYS to set a BRO ?

Not suggesting this isn't a valid dilemna SFA, (sorry spellcheck prefers dilemma?? clearly USenglish) but IYDMMSS this exercise could become more work than clicking a few options in the print dialogue box.   

Having said that, I had major frustrations with V19 last Xmas, and it all revolved around setting print options.  I was constantly being bombarded with “enter a number between n  and nn”  etc etc.  And margins and page size were unstable, - as was print to black and white ( from memory - sorry I'm trying to forget that episode in my life) and it was driving me crazy. 

I contacted DT, and he mentioned something about a bug in some early versions, and had I loaded the latest patch, and also that he was thinking of adding "print as black and white" as a SYS option. (hope I'm not misquoting him - probably am).

Anyway, In summary, I went up to V22.1 and (for a measley $100 bucks) have been smiling ever since :))  The problem went away.

So in summary, and I don't recall you clarifying which version you are using - (or why you want this macro?) - but if you aren't using V22.1, then I'd suggest either get it, or maybe make sure you get the latest patch for the version you are using;    or (I guess) suffer till V23 launches on the world ... which will/might include a SYS for black and white at least.

Can't you just see it? Crowds lined round and round city blocks on the footpath/sidewalk outside buildings;  flashing neon lights "DCAD V23 goes on sale at 9.00am" - punches exchanged between jostling draftsmen in the queue waiting for the doors to open...  Anyone remember when Windows 95 was launched ? lol

PS If (?) you only want
1. printer
2. colour vs black&white, and
3. page size
then I guess that cuts the list of options down a bit.
As long as it doesn't distract DT from adding compatibility/import/export with Sketchup - or more important still dotted lines in Paperspace :)

PS I don't think that Excel or Word have such a macro do they?  or AutoCAD? And they cost a lot more than DCAD :)