AutoCAD, AutoCAD Architecture (ACA/ADT), Revit Architecture, Revit MEP, Revit Structure, BIM, CAD, AutoLISP, VBA, VB, VB.NET, C#, databases, Access, SQL Server, FlexNet (FLEXlm), license usage reporting, software design, development, customization, integration...
Saturday, March 4, 2006
Friday, March 3, 2006
How to install a printer from a DWF
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
Read more about JTB FlexReport and ask for a free fully functional trial.
Thursday, March 2, 2006
Keep up to date with the latest ADT 2007 news...
Keep up to date with the latest AutoCAD 2007 news...
Wednesday, March 1, 2006
Subscribe using email
AutoCAD 2007 DWG file format
Use a feed reader
Subscribe Now!
...with web-based news readers. Click your choice below:
RssReader
SharpReader RSS Aggregator
RSS Bandit (the one I use most right now)
AutoCAD 2007
AutoCAD 3D
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 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 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
Contact Us
| About JTB World |
Website General Terms of Use |
Privacy Policy
^ Top of page
© 2004- JTB World. All rights reserved.