' A3 Monochrome, No lineweights, Fit All drawing Limits.
Sub main MbeSetAppVariable "PLOTDLG", "plotAttrUI.line_wghts", 0& MbeSetAppVariable "PLOTDLG", "plotUI.uiColorMode", 0& MbeSetScaledAppVar "PLOTDLG", "plotUI.dblScaleUorsToPrintUnits", 1.97 MbeSendCommand "PRINT BOUNDARY FIT ALL " MbeSendCommand "PRINT EXECUTE " End Sub
The above macro is to print drawings to the default printer.
Prints come out in colour, what am I missing??
(I recorded this with the inbuilt recorder, I am not an expert user or programmer).
I found the document I wrote a long time ago detailing the script for instant printing to a specific setting and printer
I detailed what each part does so you can choose what to leave out or add what you want,
The part about menu customise is best if you do it in a dgn lib so everyone can see the pull down otherwise its best copy the whole text into an F key and publish that
no need for basic ( which will not work on next mnst edition) or create a VBA version...
try making this into an f key just to see how easy it is... you can leave out the first part about place fence element;%D also make sure the text is all in one line .. below its shown as two lines due to the publishing software could not show it on a single line and stay on the page.
Let me know off line how you go with this or if you need more help to get it to work for your specific site office...
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me
The key in replacement of the command works well thanks, I'm going to use the suggestion. My intention was I would end up with two icons/buttons on the interface, or on a company drop down, so that the use could either pdf or print the drawing. Is this possible? At present the printer used is the windows default printer, could I add a 'syscom' command such that the printer was called from within the macro itself? i.e.
Dim startPoint As MbePoint Dim point As MbePoint, point2 As MbePoint
The second printer in my dropdown is Adobe pdf printer on my system, (I assume that is what is referred to as point2 above)
I know that I can open the windows printer dialogue, but a one click solution is preferable.
Answer Verified By: alan barnshaw
It doesnt have to be a macro it can just be a series of keyins commands strung together with ; ( semi colon)
when you run the control p or print command an mdl is loaded in the back ground
you can then run mdl load and new dialog pops choose as shown in picture will give access to more keyins scroll through to find what you need....
you may need to prefix each multiple command like paper size etc with the word print then the command then a semicolon
once you have your string you can set it to an F key for faster access
For examplel I used F12 for making A3 pdfs colour and shft F12 for plot A3 BW pdf and Alt F12 plot A3 wysiwyg PDFs for colour raster maps what you see is what you get Once you master this you will be able to do things very quickly....
Also work out other tools you can customise...
As a workaround you could use a keyin in your macro,
replacing
MbeSetAppVariable "PLOTDLG", "plotUI.uiColorMode", 0&
with
MbeSendCommand "print colormode monochrome"
See the help for other plot dialog key-ins under the heading
" Working with Completed Designs > Printing > Print Dialog > Print Dialog Key-ins "
In addition you may want to consider defining a Print Style for pre defining and setting your printing parameters. More information can be found in the help " Working with Completed Designs > Printing > Print Styles "
See also communities.bentley.com/.../7203