Friday, March 3, 2006

How to install a printer from a DWF

I have though about sharing this tip about "Printer Connector" a long time. I've got some emails from those wondering how it could be done after Shaan Hurley, Autodesk posted about a solution I made a few years ago at the company I work for. Now I got reminded again reading about Internal Facilities Management application by Scott Sheppard, Autodesk. I assisted Brian Mathews and Brian Pene at their class at Autodesk University 2005 in Florida and I really recommend you to take a look at the available class materials you can find on Scott's blog. Actually Brian was one of those wondering how I had solved installing the printers from a DWF hyperlink. Nice to see that it's used at Autodesk too. Now to the solution that is really simple but useful.

Start with a DWG drawing of the facility and add a block that represents a printer or plotter. Add a hyperlink on the block that links to a html file on a location available for all users. Use the name of the printer and maybe size and type as description. The content of the html file is here. Just change the server name and the printer name in the code. Now Plot or Publish the drawing to DWF. If you have several levels and buildings you can create a main html page that links to these DWF files. The DWF files can also be embedded into a html page and add some simple instructions that they should click on a printer etc.
<html>
<head>
</head>
<p><font face="Verdana">Printer connection...</font></p>
<SCRIPT LANGUAGE="VBScript">
<!--
on error resume next
Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\SERVERNAME\PRINTERNAME"
msg="Do you want " & PrinterPath & " to be Default printer?"
answ=msgbox(msg,vbYesNoCancel,"Add Printer")
If answ=vbYes then
  WshNetwork.AddWindowsPrinterConnection PrinterPath
  WshNetwork.SetDefaultPrinter PrinterPath
elseif answ=vbNo then
  WshNetwork.AddWindowsPrinterConnection PrinterPath
end if
history.back()
-->
</SCRIPT>
</html>
See this html code or check in the DWF Viewer Help.
<script language="vbscript">
<!--
on error resume next
if not IsObject(CreateObject("AdView.AdViewer")) then msgbox "You need the DWF Viewer!" & vbNewLine & vbNewLine & "Please contact the IT department."
function ShowPrinters
EView.Viewer.HighlightLinks = not EView.Viewer.HighlightLinks
end function
-->
</script>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Printer Connector</title>
<style type="text/css">
a:link {color: #FFFFFF}
a:visited {color: #FFFFFF}
a:hover {color: #FF0000}
a:active {color: #FFFFFF}
</style>
</head>

<body bgcolor="#4083A8" topmargin="0">

<OBJECT
id=Eview
codeBase="file:///server/dwfviewer/installer/DwfViewerSetup.cab"
classid=clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF
width=100%
height=92% border="2" vspace="4">
<param name="_cx" value="38788">
<param name="_cy" value="25056">
<param name="BackColor" value="7895160">
<param name="EmbedDoc" value="0">
<param name="Src" value="Printers.dwf?NotifyMissingFonts = false">
<param name="ViewerParams" value="?NotifyMissingFonts = false">
</OBJECT>

<script language="vbscript">
<!--
; If multipage DWF's are used navigate to the page named "Level 8"
EView.Viewer.Page = "Level 8"
-->
</script>

<font face="Verdana" color="#FFFFFF" size="2">
<i>Click on the
<a title="Flash the printers" href="vbscript:ShowPrinters">printer</a> you want to have installed.
</i></font><br>
<font face="Verdana" size="1"><font color="#FFFFFF">Send mail to
<a href="mailto:HelpDesk%20IT?subject=Printer Connector">HelpDesk IT</a> or
the </font>
<a href="mailto:info@jtbworld.com?subject=Printer Connector">
Author</a><font color="#FFFFFF">
with questions or comments about Printer Connector.</font></font>
</body>

</html>

I recommend that you activate usage of single click to follow hyperlinks or include instructions to hold down CTRL + Click.

I hope you get the idea. Feel free to use it, have fun and impress on your management and users and IT. Feel free to contact me if you got any questions or post a comment.

Companies worldwide selects JTB FlexReport

Companies all over the world uses JTB FlexReport. From Australia and Portugal to US. Teleca Ltd., UK; Sec. Regional do Equipamento, Portugal; Cúram Software, Irland; WSP Management Services, UK; SNG SurgutNIPIneft Russia; Port of Seattle, US; Pate Engineers, Inc., US; Affinion Group, US; Guardian Life, US; GPD Associates, US; GAI Consultants, Inc., US; GHD, Australia; Bascon A/S, Denmark; Aker Yards AS, Norway; CDS/Muery Services, US; Britannia Building Society, UK; RMT, Inc., US has recently purchased JTB FlexReport as their solution to have better control on their network licenses based on the FLEXlm or FLEXnet technology. E.g. details on what users are using the product most or least can be reported on as well as graphical reports as seen below. This is done for applications like ARM, Rational Rose, SoldWorks, AutoCAD, MagiCAD, Novapoint, Mathcad, ProE, Matlab, ESRI ArcGIS, Intergraph GeoMedia, SpeechWorks and others. Support for consolidating several version of one application. If you have Autodesk subscription you are allowed to have for example AutoCAD 2007, AutoCAD 2006 and AutoCAD 2005 available for the users as long as you don't use more licenses as you have subscription for. JTB FlexReport can group these licenses together in one graph.

Read more about JTB FlexReport and ask for a free fully functional trial.

Wednesday, March 1, 2006

Subscribe using email

To the left I've added support to subscribe to updates on this blog and get them by email using the free service from FeedBlitz. It takes only a few seconds to set yourself up.

AutoCAD 2007 DWG file format

New DWG file format. Now it's AutoCAD 2007 DWG. So users without AutoCAD 2007 needs to download DWG TrueConvert™ that can batch convert from AutoCAD 2007 DWG to 2004, 2000 and R14. Or you can use SaveAs that now allows to save down to R14 DWG and R12 DXF as well as several versions in between. AutoCAD 2007 will optionally warn users when the DWG file they are opening was saved using an application that was not created by an Autodesk product or RealDWG licensee.What is a Trusted DWG? Answer here. In the tray within AutoCAD you will either see for a Trusted Autodesk DWG and for a Non Autodesk DWG.

Use a feed reader

Here is the statistic for users that subscribes to the blog feed: http://feeds.feedburner.com/JtbWorld Using a feed reader is an easy way to get the latest from this blog and others. If you want to keep the news coming about AutoCAD 2007 and other things consider using a feed reader.

Subscribe Now!
...with web-based news readers. Click your choice below: addtomyyahoo4Subscribe in NewsGator OnlineSubscribe with Pluck RSS readerSubscribe in RojoSubscribe with BloglinesAdd to Google ...or download a free reader:
RssReader
SharpReader RSS Aggregator
RSS Bandit (the one I use most right now)

AutoCAD 2007

A picture of AutoCAD 2007 that shows a lot of the news. It is a 3D model on screen with shadows, conceptual visual style, edge overhand, edge jitter, silhouette edges, obscured edges in a perspective projection that you can work in. Anchored palettes as icons only to the left and with text and icons to the right. The dashboard palette is a single palette with most 3D features. What can you see more? Click for larger picture

AutoCAD 3D

3D is the big thing in AutoCAD 2007 that is soon to be released. More will come on the blog and website. www.jtbworld.com/autocad2007.htm

Saturday, February 18, 2006

Center prints in Autodesk DWF Viewer

In some of the latest versions of the Autodesk DWF Viewer there has been a problem to plot or print centered in half scale. Typically we produce A1 DWF files but want to print them on A3 paper. Print to scale is not an option since they should be plotted to 50% scale. The drawing gets clipped only on 2 sides and not on all 4 sides. There is though a workaround in the latest Autodesk DWF Viewer 6.5 using a registry setting. So now it works to print to scale and have the margines clipped on all 4 sides.

The setting (pplsvpPlacementModifier = 1) that has worked good for me is used in this reg file. Download and run it. DWF Viewer has to be restarted.

The registry key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\DWF Common\Settings
REG_DWORD pplsvpPlacementModifier
The possible values are:
0 - align the center of the physical page with the center of the virtual page [default].
1 - align the center of the printable-area of the physical page with the center of the virtual page.
2 - align the lower left corner of the physical page with the lower left corner of the virtual page.
I've also noticed that Scott Sheppard has updated his FAQ to include this tip.

AutoCAD Palette Auto-hide Speed freeware

Did you know that you can change the time it takes to show/hide or roll-up/roll-out the palette windows in AutoCAD, ADT or other verticals when you have activated Auto-hide? It is possible but is not so obvious and easy. Until now.

Here you can download PaletteAutoHideSpeed.exe that helps you with this. There is no install provided since it's only one file so place it anywhere you want and run it. If you have different versions or verticals of AutoCAD you have to open the one you want to change and close it before running this application.

Hoover the mouse over "Tip here" in the application for a useful tip.

The requirement for the application to run is to have Microsoft .Net Framework v2.0 installed. It can be downloaded here. If you don't have it installed you will get a message when trying to start PaletteAutoHideSpeed.exe. I don't plan on supporting older versions of .Net Framework.

If you like this application and want to make a donation use this link and add the amount you like. Most Credit Cards are accepted and you don't need a PayPal account. Thanks!

You can also add comments below or send me an email. There is no support for this freeware but if you run into any problems or have any questions it's free to ask and I might be able to do something about it.

For those wanting to know what the application does. Here's what. It locates the file fixedProfile.aws for the last run AutoCAD based application. It then changes the delay time in the file that is in XML format. In ADT 2006 it looks like this as default:

< paletterollupdelay="600">< paletterolloutdelay="200">

If you go in there and changes the Roll-up speed it will not work because of a minor spelling error. (Update: This has ben corrected in ADT 2007) You also have to change PalleteRollupInfo to PaletteRollupInfo. The spelling error is corrected by the application.

In AutoCAD there is no existence of these rows so they have to be added at the correct location.

Update 2008-01-15 Version 1.2 released with AutoCAD LT support and the homepage is available at http://www.jtbworld.com/PaletteAuto-hideSpeed.htm

Friday, February 17, 2006

Does AutoCAD 2006 view transitions

I got this question and wanted to share the answer here for the benefit of others with the same question.
"I have a question regarding the zoom function in AutoCAD 2006. In versions past when you would zoom and pick your objects the zoom would be instantaneous. Now it gradually zooms in and out. I move very fast in AutoCAD and this definitely slows me down. Do you have any idea how to turn this function off? I have searched the help files and the pamphlet that came with my cd and to no avail. I hope you don't mind taking the time to help me with this. Thanks in advance for your help!"
This is one of the most visible changes when you start using AutoCAD 2006. Maybe you like it, maybe you don't. This setting is not in any menu and you might not know what to search on but here you go. The command that opens the dialog box you see here is VTOPTIONS. There are also system variables available. VTENABLE - Controls when smooth view transitions are used. Default value is 3 and any value between 0 and 7 is valid. Look for vtenable in the help for more information on it. VTDURATION - Sets the duration of a smooth view transition, in milliseconds. VTFPS - Sets the minimum speed of a smooth view transition, in frames per second.

How to preset the path type in the xref attach dialog box

I have some AutoLISP code for AutoCAD on my website to preset the Path type in the xref attach dialog box. I got this question.
I am wondering how to use the sample lisp you have for presetting the path type in the xref attach dialog box. I don't have much experience with lisps, and have only worked with ones that are run from the command line. How do I work with the sample code you provide?
So here I've added 3 commands and for the one that wants to learn how to do it just take a look at the code. By using c: before the function a command is created. The commands are SXA, SXR and SXN. Select the code below, copy it into Notepad and save it to something with the .LSP extension. Then use APPLOAD within AutoCAD to load the file or just drag and drop it into AutoCAD from Explorer. Another way is to enter for example (SetPathType 0) on the command line.
;;;
;;; Sets the Xref Path type used in the xref attach dialog box
;;; Absolute Path: (SetPathType 0)
;;; Relative Path: (SetPathType 1)
;;; No Path: (SetPathType 2)
;;;
;;; By Jimmy Bergmark www.jtbworld.com
;;;

(defun SetPathType (v)
  (vl-load-com)
  (vl-registry-write
    (strcat
      "HKEY_CURRENT_USER\\"
      (vlax-product-key)
      "\\Profiles\\"
      (vla-get-activeprofile
(vla-get-profiles
  (vla-get-preferences (vlax-get-acad-object))
)
      )
      "\\Dialogs\\XattachDialog"
    )
    "PathType"
    v
  )
)

;;; Gets the Xref Path type used in the xref attach dialog box
;;; 0 = Absolute Path
;;; 1 = Relative Path
;;; 2 = No Path

(defun GetPathType ()
  (vl-load-com)
  (vl-registry-read
    (strcat
      "HKEY_CURRENT_USER\\"
      (vlax-product-key)
      "\\Profiles\\"
      (vla-get-activeprofile
(vla-get-profiles
  (vla-get-preferences (vlax-get-acad-object))
)
      )
      "\\Dialogs\\XattachDialog"
    )
    "PathType"
  )
)

;;; Set Xref Absolute path

(defun c:SXA ()
  (SetPathType 0)
  (princ)
)

;;; Set Xref Relative path

(defun c:SXR ()
  (SetPathType 1)
  (princ)
)

;;; Set Xref No path

(defun c:SXN ()
  (SetPathType 2)
  (princ)
)

(princ)

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner

Contact Us | About JTB World | Website General Terms of Use | Privacy Policy
^ Top of page

© 2004- JTB World. All rights reserved.