Thursday, April 28, 2005
Wednesday, April 27, 2005
I run into an introduced bug in AutoCAD 2006 today. When using the command Close in a script the execution stops. This didn't happen in AutoCAD 2005.
The below script will stop after running the first close:
If you find a bug make sure to notify Autodesk of it so it can get fixed.
One way is: http://www.autodesk.com/submitbug
One workaround is to use is to add a space after the CLOSE command so it becomes "CLOSE " instead of "CLOSE". This only works for 2006 so you have to have separate scripts for 2006 and older versions.
Another workaround that works for all versions is to use the code below instead of CLOSE
(command "VBASTMT" "Application.ActiveDocument.Close(False)")
(command "VBASTMT" "Application.ActiveDocument.Close(True)")
The first one is if you want to close and don't save the drawing.
The other one is if you want to save the drawing.
Monday, April 25, 2005
Saturday, April 23, 2005
Friday, April 22, 2005
AutoCAD 2006 introduced a new functionality related to dimensions. The command is aidimfliparrow and it lets you flip the direction of an arrowhead. This is sometimes useful as the image shows.
The command is available if you select a dimension and right-click on it. Make sure that you select the dimension on a point that is close to the arrowhead that you want to flip. Only one arrowhead at a time can be flipped.
Note that ADT 2006 doesn't have this command on the right-click menu.
A minor bug is related to this command. If the aidimfliparrow command is run from the command line it accepts multiple objects but it only works if you select one dimension object.
Tuesday, April 19, 2005
AutoCAD 2006 requires a new version of the NLM executables. lmtools.exe is version 10.1.5.0 now.
Here is a quick way to use when you need to upgrade NLM. It could be from AutoCAD 2005 to AutoCAD 2006, other versions or products that uses Macrovision's licensing technique. There is no need to uninstall the old Autodesk Network License Manage and install the new if you don't want to.
- Identify the location of these files on your server(s):
adskflex.exe, lmgrd.exe, lmtools.exe, lmutil.exe
- On the AutoCAD 2006 CD the files are located here
\Bin\acadFeui\support\nlm\Program Files\Autodesk Network License Manager
- On the AutoCAD 2006 CD run Setup, select Network Deployment and install the Network License Activation Utility. With this utility you can easy and quick request a new license file or append to your existing license file the new feature.
- When you have made the change to the license file go to the license server and stop the FLEXlm/FLEXnet service(s) using lmtools.exe.
- Now copy the 4 exe files mentioned from the CD (DVD) to your server.
- Run lmtools.exe and start the service(s).
If you do the above quick enough (stopping the service, copying the files and starting the service again) and is cool you can do it even when users are using AutoCAD. I don't recommend it but I have done it so I know it works. Recommendation is to do it at a time so you can recover the errors that might happen.
To better control the license usage give JTB FlexReport a try.
Monday, April 18, 2005
Monday, April 11, 2005
Sub Example_HatchAreas() Dim oSset As AcadSelectionSet Dim oHatch As IAcadHatch2 Set oSset = ThisDrawing.SelectionSets.Add("TEST_SSET1") oSset.SelectOnScreen For Each oHatch In oSset Debug.Print oHatch.Area Next End Sub
JTB FlexReport is a report tool for applications using the FLEXnet / FLEXlm software licensing. Do you want to optimize your software purchases tomorrow? JTB FlexReport is a inexpensive solution that will help you. By the tracking JTB FlexReport does and the graphic reports that can be produced JTB FlexReport will helps you to manage and forecast license usage at your company. Is SAMsuite or SAMreport a too expensive product? Then take a good look at JTB FlexReport.
JTB FlexReport will help you to see the license usage over the time. This will help you to decide when and how many licenses you will need to purchase next time. Instead of guessing and purchasing more licenses than you really need you can save your money using JTB FlexReport.
JTB FlexReport can also produce HTML reports showing who uses the licenses right now. Click here for a sample.
Data is also logged so you can track the usage per user.
Lets say you have 10 licenses of your software that costs $3,000. Now you have 20 users that shares these licenses. Do you know if you really need these 10 licenses or if you need more now when 2 more users are coming in? If you have JTB FlexReport it will be easier to make a correct decision. If you just need to purchase 1 less license imagine your benefit of using JTB FlexReport.
Applications and companies that uses FLEXnet / FLEXlm from Macrovision (formerly Globetrotter Software) are many. Over 2500 independent software vendors have used the FLEXnet / FLEXlm family of products. Among them are companies and/or applications from Autodesk, AVEVA (PDMS), Borland, Cadence, CADopia (IntelliCAD), Cognos, EDS, I-Deas, Macromedia, Mathsoft (MathCAD), Mathworks (Matlab), Pixar, Platform, Progman/Cadcom, PTC (Pro-Engineer), Rasterx (RxView), Softimage, Solidworks, Sybase, WindRiver, etc.
Look at the PowerPoint presentation about JTB FlexReport Make sure you view the show since it's animated. Press F5 in PowerPoint.
Get JTB FlexReport and join other users around the globe like VOLVO IT, Imation, Leica Geosystems, COWI AS, Boyle Engineering, WD Partners, Siemens Logistics and Assembly Systems and Berkley Lab.
Sunday, April 10, 2005
Saturday, April 9, 2005
Thursday, April 7, 2005
Wednesday, April 6, 2005
Tuesday, April 5, 2005
I got a question on how to do this from my fellow worker Robert and thought I should put the answer here.
One way is using the XMLHTTP object combined with adodb.stream like this using VBScript:
' Requirements: ADO 2.5+ and IE 5+
sSourceUrl = "http://www.jtbworld.com/images/"
sDestFolder = "c:\temp\"
sImageFile = "jtbworld.gif"
Set oXMLHTTP = WScript.CreateObject("Microsoft.XMLHTTP")
oXMLHTTP.open "GET", sSourceUrl & sImageFile, False
Set oStream = CreateObject("adodb.stream")
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
oStream.Type = adTypeBinary
oStream.SaveToFile sDestFolder & sImageFile, adSaveCreateOverWrite
Set oStream = Nothing
Set oXMLHTTP = Nothingx
Monday, April 4, 2005
Sunday, April 3, 2005
(defun imageframe () (setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS")) (if (not dict) 0 (cdr (assoc 70 dict)) ) )