Tuesday, August 9, 2011

Deploying Infrastructure Design Suite - Part 2

Although it applies to any installation package, not just IDS, the next really useful skill I've picked up is performing a silent uninstall.  In the case of my deployment, I would like to uninstall certain applications if they exist (Civil 3D 2010, LDT 2009 Companion, and Raster Design 2010).  Figuring out the right command with the right switches to uninstall a specific program has historically been very challenging, until I met my new best friend AppDeploy.com.  Here you can take advantage of the kind folks who provided uninstall codes for lots and lots of different applications.  There's no guarantee you'll get the right one the first time but at least it narrows it down.  For example, I searched Raster Design 2010 and got this:
There are two codes listed here and lucky me!...the first one worked.  I had to doctor it up a bit by adding a /x and /quiet switches and also an IF statement that checked for a file to see if RD was even installed.  After that, I just added this line to the beginning of my batch file and Raster Design be gone!

IF Exist "C:\Program Files (x86)\AutoCAD Raster Design 2010\acgiclipengine18.dll" Call MsiExec.exe /x{9E92FE3D-E224-0409-0002-69EA414E8E51} /quiet


Got a more eloquent way to silently uninstall program X, please share!

Friday, August 5, 2011

Deploying Infrastructure Design Suite - Part 1

Over the next few days I'm going to be building and testing a deployment for the Infrastructure Design Suite for about 150 users.  Already I've run into some interesting revelations so I thought I'd chronicle my experience to hopefully save those who go after me some time and headaches.

First big lesson: When you choose to include Civil 3D, Map, and AutoCAD in your deployment you get three complete installations.
That's right folks.  It's not three separate AutoCAD profiles like you'd expect (or at least I did), you get three complete installations.  I haven't decided yet whether this is a good thing or a bad thing but I do know it's going to make me rethink my deployment strategy.

Within every installer is a "staller" (couldn't resist that play on words)
Another really helpful thing I've learned deals with batching your Civil 3D installation along with other stuff.  In the past, when I tried to call the Civil 3D installation then something after it, the next thing would execute before Civil 3D finished and there would be a big mess.  Thanks to this post from The CADMasters blog I was able to put a stall function in my batch file that would force the batch file to wait until Civil 3D was done.  I had to tweak it a bit to get it to work, here's the resulting "staller" piece of the batch file:


CALL CIVIL 3D DEPLOYMENT HERE
set tempfile=c:\windows\temp\tmp.txt
:IsRunning
REM **********Wait until Previous install is finished before calling next install************
PING 1.1.1.1 -n 1 -w 10000 >NUL
del %tempfile%
tasklist > %tempfile%
type c:\windows\temp\tmp.txt |find /i "setup.exe"
if errorlevel 0 if not errorlevel 1 goto IsRunning
CALL SOMETHING ELSE HERE

See you when I post Part 2!

Tuesday, August 2, 2011

Linetypes on Really Long Polylines

As the blog title above implies, I like to write about things that make me go hmmmmmm, and this one had a lot more m's than usual.  A user had a linetype that she needed to display in two viewports; one at 1" = 100' and the other at 1" = 30'.  The linetype looked great in the 100-scale viewport but appeared as a continuous line in the 30-scale one.  I checked all the usual stuff and then leaned back in my chair and scratched my head.
Next, I switched the drawing to the Model tab and set the drawing scale to 1" = 30' and drew my own line on the same layer - linetype looked great, her polyline looked continuous.  Hmmmmm.  Not sure what made me do it but I used the BREAK command to break her polyline and voila! the linetype appeared.
Now, the linetype in question was a custom one that uses a custom shape.  I think maybe there is a limit to the number of times that a pattern can be repeated within a given object (or maybe a shape inserted) but when you took this massively long polyline (76 miles) and tried to show it at a smaller scale (more copies) it said "Uh-uh, not doing that."  The solution was simply to turn the 76 mile polyine into as many shorter ones as needed by using the BREAK command or whatever other command you fancy.

Hmmmmmm.
 Before
After