' Add reference to AutoCAD/ObjectDBX Common 16.0 Type Library (axdb16enu.dll)
' This samples copies all dimstyles from specified drawing to the current drawing
' Existing dimstyles are not affected
Public Sub ImportDimstyles()
Dim oAxDbDoc As New AxDbDocument
oAxDbDoc.Open "c:\DimStyles.dwg"
Dim oObj() As Object
Dim oDs As AcadDimStyle
Dim i As Integer
For i = 0 To oAxDbDoc.DimStyles.Count - 1
ReDim Preserve oObj(i)
Set oObj(i) = oAxDbDoc.DimStyles(i)
Next
oAxDbDoc.CopyObjects oObj, ThisDrawing.Database.DimStyles
End Sub
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...
Tuesday, January 17, 2006
Copy dimstyles between drawings using VBA
ADT and changing the Sheet storage location
Tuesday, January 10, 2006
Process piping design and engineering using AutoCAD?
My name is Peter Quinn and I am a product manager at Autodesk. I am doing research into how our customers use AutoCAD and other CAD applications for process piping design and engineering. If you are interested in providing feedback, please click on the link below to answer a couple of question. http://myfeedback.autodesk.com/ADSKSurvey/TakeSurvey.asp?SurveyID=3J05m43M8pl2M Thank you Peter Quinn Autodesk (415)507-8152
Draw a line at design time in Visual Studio
' Visual Basic 2005
Private Sub FormPaint(ByVal sender As Object, _
ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
' Draw a diagonal line from the top left to the lower right.
e.Graphics.DrawLine(Pens.Black, 0, 0, Me.ClientSize.Width, _
Me.ClientSize.Height)
End Sub
Get the name of the default printer using VBA
Public Declare Function GetProfileString Lib "kernel32" _
Alias "GetProfileStringA" _
(ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpDefault As String, _
ByVal lpReturnedString As String, _
ByVal nSize As Long) As Long
Public Function DefaultPrinter() As String
Dim strReturn As String
Dim intReturn As Integer
strReturn = Space(255)
intReturn = GetProfileString("Windows", ByVal "device", "", _
strReturn, Len(strReturn))
If intReturn Then
strReturn = UCase(Left(strReturn, InStr(strReturn, ",") - 1))
End If
DefaultPrinter = strReturn
End Function
Monday, January 9, 2006
Refreshing blog template design skills
Saturday, January 7, 2006
Update a network image with the latest version of DWF Viewer
Do you want the latest version of Autodesk DWF Viewer installed with AutoCAD or any other installation.
Here is one tip:
If you have a network image of let's say AutoCAD locate this file:
\AdminImage\support\aev\DWFViewerSetup.exe
Download the latest version of the DWF Viewer and replace it.
Make sure that these rows are in the setup.ini file (or the ini that you use):
[VIEWER]
PRODUCT_NAME=Autodesk DWF Viewer
INSTALL_CMD=support\aev\DWFViewerSetup.exe
INSTALL_CMD_ARGS=/u2 /q2
INSTALL_IGNORE_FAILURE=YES
If it's not there you can add it.
Update:
You also have to edit the row starting with SETUP_PRODUCT_NAMES= so it includes VIEWER
If you don't want the viewer to be installed you can remove it from the ini file as well.
Autodesk DWF Viewer deployment tips & trix
To install:
on error resume next
Set WshShell = CreateObject("WScript.Shell")
' /q2 is install without progress meter
' /q is install with progress meter
WshShell.Run """//server/DWF/6.5/DwfViewerSetup.exe"" /q",1,true
Here is something that could be done as a post installation:
on error resume next
Set WshShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
' Delete the link from the start menu
key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\" & _
"CurrentVersion\Explorer\Shell Folders\"
path=WshShell.RegRead(key & "Common Programs") & "\Autodesk"
fso.DeleteFile path & "\Autodesk DWF Viewer.lnk",True
' Delete the folder from the start menu if it's empty
if FolderEmpty(path) then fso.DeleteFolder path, True
' Do not check for a new version when starting DWF Viewer
key = "HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\" & _
"DWF Viewer\Settings\AutoUpdate\InitialCheck"
WshShell.RegWrite key, 1, "REG_DWORD"
' Do not check that often
key = "HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\" & _
"DWF Viewer\Settings\AutoUpdate\CheckInterval"
WshShell.RegWrite key, 1000, "REG_DWORD"
' Make sure that if the user cannot update from the Help menu
key = "HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\" & _
"DWF Viewer\Settings\AutoUpdate\URL"
WshShell.RegWrite key, "C:\", "REG_SZ"
' Use single click to follow hyperlinks
key = "HKEY_CURRENT_USER\Software\Autodesk\DWF Common\" & _
"Preferences\User Interface\Single Click Hyperlink"
WshShell.RegWrite key, 1, "REG_DWORD"
' Suppress Getting started Page
key = "HKEY_CURRENT_USER\Software\Autodesk\DWF Common\" & _
"Preferences\User Interface\Suppress Startup Page"
WshShell.RegWrite key, 1, "REG_DWORD"
Function FolderEmpty (path1)
Set oFolder = fso.GetFolder(path1)
Set oFiles = oFolder.Files
flag = true
For Each i in oFiles
flag = false
Next
FolderEmpty = flag
End function
To uninstall:
on error resume next
Set WshShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\" & _
"Uninstall\Autodesk DWF Viewer\UninstallString"
UninstallString=WshShell.RegRead(key)
if UninstallString<>"" then WshShell.Run UninstallString & " /q",1,true
Thursday, January 5, 2006
Browse the Web safely and avoid the WMF vulnerability
Final update!!!
The security update is ready and released. Update your PC now.
It seems to co-exist fine with the REGSVR32 workaround and the Ilfak patch.
Here are some useful links. Make sure your IT people acts on this. I had to do it at the company I work for since they didn't even know about it even after it had been around since Wednesday, December 28, 2005.
Update!
"Microsoft has completed development of the security update for the vulnerability. The security update is now being localized and tested to ensure quality and application compatibility. Microsoft’s goal is to release the update on Tuesday, January 10, 2006, as part of its monthly release of security bulletins. This release is predicated on successful completion of quality testing."
Microsoft Security Advisory (912840) that includes a suggested action (Updated: January 3, 2006)
New WMF 0-day exploit - There's a new zero-day vulnerability related to Windows' image rendering - namely WMF files (Windows Metafiles). Trojan downloaders, available from unionseek[DOT]com, have been actively exploiting this vulnerability. Right now, fully patched Windows XP SP2 machines machines are vulnerable, with no known patch.
Targeted WMF email attacks
It's not a bug, it's a feature
Internet Storm Center recommends Ilfak too
New WMF exploit attacks via email
Bad behaviour
First WMF worm found
Overview of the WMF related articles at the ISC
Handler's Diary: VMWare Browser;Installing a Patch Silently;Checking for .wmf Vulnerabilities
The posts below are not exactly related to the WMF vulnerability but are well worth reading since many vulnerabilities that are exploited requires administrator rights.
Browsing the Web (Part 1) and Reading E-mail Safely as an Administrator. Michael Howard discusses how you can run as an administrator and access Internet data safely by dropping unnecessary administrative privileges when using any tool to access the Internet. Part 2
The Non-Admin blog - running with least privilege on the desktop
Least privileged user access for developers. A blog entry about what developers can and should do regarding least privilege and least privileged user access (LUA) on Windows.
Updates:
http://blogs.technet.com/jesper_johansson/archive/2006/01/02/416762.aspx
Monday, January 2, 2006
Free ADT Webcasts
AUGI's new look
Sunday, January 1, 2006
Add sequential numbering to text objects in AutoCAD
- Sort selection set by X, Y, or Select-order
- Placement of text- Overwrite/Prefix/Suffix/Find&replace
Accept MDB files in Outlook
Outlook blocked access to the following potentially unsafe attachments: []
As default (since some security update) MDB files as well as some other file extensions are stopped but this registry hack solves it if you want to
9.0 is for Outlook 2000 SP3
10.0 is for Outlook 2002
11.0 is for Outlook 2003
12.0 is for Outlook 2007
14.0 is for Outlook 2010
15.0 is for Outlook 2013
Run Regedit, and go to this key:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security
Under that key, add a new string value named Level1Remove or use the existing one
For the value for Level1Remove, enter a semicolon-delimited list of file extensions. For example, enter
.mdb;.url
You might have to restart the computer or at least Outlook
ref: http://support.microsoft.com/kb/829982
Saturday, December 31, 2005
Get the latest feed icon
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.