Posts

Infraworks: Javascript to Randomize Species and Height

What it Does and Where to Paste It The script below is to replace the default tree feature script that is in the "Script" tab of the data source configuration.  Adjust percent chance of tree type by modifying the if condition (Math.random() > 0.5) Set the base line scale factor for each tree type by modifying the scaleFactor variable. Set how much variance you want to allow by modifying scaleVariationMax variable. The Script: I hope you find this useful.

Create Snapshots from Bookmarks with Javascript (Debugged)

On April 19th, 2017, Matt Wunch published a quick script to generate snapshots of every bookmark in this AUGI article: https://www.augi.com/articles/detail/tips-for-increasing-efficiency First of all, thanks Matt. I was looking for this exact same thing. There were a couple of bugs that made it fail to run, however. I took the liberty of fixing the bugs and reformatting it a little bit. Well, here is the working version of the code: Notes Make sure that the filePath specified exists or Infraworks will freeze. Make sure that bookmark names do not use spaces or special characters (except underscore). Use a variable safe name like camelCase or Underscore_Word_Separation. Again, a big thank you to Matt Wunch for the original code. I knew enough to debug the code but I wouldn't have been able to write it from scratch since I havn't dived into the Infraworks javascript functions or variables yet. Hope that helps!

Lessons We Can Learn From Gamers

Image
Pro gamers stay on top by the slimmest margins. To stay on top, they have worked out the most efficient habits on how to interact with a computer. These lessons are transferable to CAD work. Eliminate Hunt and Peck I hope nobody reading this types by the hunt-and-peck method anymore. Even the fastest hunt and peck die-hards top out at roughly 50 wpm. Good touch typists, on the other hand, operate at 100+. Clearly, hunt-and-peck destroys productivity. For CAD work, hunt-and-peck means something different since one is one the keyboard and the other is on the mouse. It looking at the keyboard, looking for a keystroke because shortcuts are spread out over the entire keyboard. It is also taking the mouse hand off the mouse needlessly. The best way to eliminate hunt and peck for a keyboard-and-mouse situation, as gamers have long established, is the WASD position. The WASD position is where the pinky is on Left Shift, ring finger on A, middle finger on W, and index finger on D. Lumion...

If You Dont' Use Shift+RMB Keyboard Shortcuts... You Should.

Apparently, shift + rmb (right mouse button) keyboard shortcuts are something that very few people use. It's very handy. For example, I can just press shift+rmb,d in the middle of drawing a line to snap to a node without having to escape out and turn osnap on. Because of the shift+rmb shortcuts, I rarely have osnap left on any more. After a couple of minutes of experimentation, my findings for the shortcut defaults (as of 2018) are listed below. The most useful ones, in my humble opinion, are bolded. Not only are they needed, they are easily reacheable from the WASD home position of the left hand. (Which is the key for lightning fast cad work. I will elaborate on that in another article) Keyboard Shortcuts After Shift+rmb q - Quadrant w - Midpoint between 2 points e - Endpoint r - Nearest t - Point filters (submenu) i - Intersection p - Perpendicular a - Apparent intersect s - Insert d - Node f - From t - Tangent k - Temporary tracking point o - Options (dial...

The Perfect CAD Machine: Say No to Laptops

Recently, I was asked to submit to my organization's IT department concerning what kind of computer setup is best for civil technology. My answer might be surprising to some: it's not a laptop, it's not 4k, and it's not a "workstation" setup. Why Not a Laptop Right off the bat, laptops are simply out of the question for any heavy duty work. The reason is that while processors are getting faster and faster, laptops lack the physical space to dissipate heat effectively. There virtually no space for a proper heat sink, fan, and air flow channels, the secondary vents are often on the bottom of the laptop which do not work unless the laptop is raised off the desktop. Not many people use their laptop raised off their desks. The high heat typically makes the laptop throttle down its chips, resulting in a massive reduction in performance and often, catastrophic hardware failures. Let's consider the heat sink design problem for laptops. There is no room fo...

Some Much Needed Humor; Civil Tech Needs Software Engineering

" Why you should not learn to code. ("Just stop already, it's too hard.") " Techlead created this masterpiece of dry wit yesterday and it already has 21k+ views. It's a true gem. Please check it out here . Why Software Engineering Must Intersect with Civil Technology I always thought that the software engineering field had a lot to show us civil techs on how to do get things done on time, with less effort, and with style. First of all, good coders make their work readable, and with helpful comments peppered throughout their work. Compare this to a typical design drawing in a large projects with contributions from several techs. It take some real skill to be able to stitch together what corridor feeds of which surface using which targets etc. Add in a couple of tight deadlines and things can resemble a messy pizza real quickly. Now coding has its own share of nightmare stories I'm sure but I would bet money that pound-for-pound, coding pr...

What tech is really about / My first real experiences with computers.

My love with technology first surfaced late in my elementary school years. In hindsight it was obvious from the beginning what being a tech head was all about. I'll come back to that. In grade six I remember studying for a social studies exam  for hours every day. It was especially hard since I've only been learning English for two years at that point. A couple of weeks prior, I begged my parents if they could buy me a computer and they said that they would if I got 100% on my exam. I wanted a computer of my own because I loved playing around with the Macs in the school computer lap. A bunch of us played a multiplayer Star Trek game where we each controlled a ship and shot each other with phasers and torpedoes. I even found the fireworks screensaver fascinating. I remember that my teacher was so proud to give me back my test. I got 97% on it and she didn't expect that out of me at all. I was just a Korean kid who was still taking ESL classes. She just didn't underst...

How I Got Started In My Civil Tech Career

As a mentioned in an earlier post, I've just had my fifth year as a civil tech. It took a lot of things going right for me to get started in this career. It took an outstanding teaching in college who looked out for my future in so many ways. He was the one who set me up with a two-week internship at my current employment, in fact. He, along with several other teachers, also backed me up during my negotiations with the administration when I was in danger of having to repeat my final year. If you are reading, thank you Mr. Morrison. A big thank you to Mrs. Coleman and Mr. Nelson as well. At the risk of sounding immodest, it also took an insane level of determination. The two years I spent learning at my community college in preparation for civil technology was absolute hell. The workload was high. Sure, I could have coasted and scraped by. But as with most things you get what you put into it and I really wanted to go beyond what was necessary. What really made it difficult was t...

The return of the Solved.Blog!

A month ago I've hit my fifth year as a civil tech. I started this blog to document the things that I've learned about working as a tech back in 2014. A couple of months later I stopped writing to create a collection of help documents for my employer for private use. Four years later, that work has been fleshed out with several other contributors and I think it is a good time to write for myself and the community in general.I think I will begin with a look back at my still-young career, and share some observations with not only other techs but also for students who are looking into this industry. Do you have a blog of your own? Please feel free to share.

Preparing for a Critical Software Failures

Sometimes software has a critical failure and you are better off (or forced to) reinstalling. It could be AutoCad, Office or even Windows. Just in case, it pays off to have the product information and serial keys saved or written down somewhere. Autocad You can access Autocad product and serial info via the about command: Hit the downward arrow next to the help button then click "About..." to bring up the serial info. Either write down the info or screen capture it is a image file and put it in a safe place. Windows & Office For Windows and Office product keys, you can hunt them down through the registry key. A better solution though, is to use a free utility to do it for you. A good key finder currently is Magical Jelly Bean . It installs clean, works quickly and is free. System Restore Points  If you have not checked recently, be sure to check you operating system and make sure you have a recent system restore point. Having a good restore point can save you...

The Most Cost Effective Setup for AutoCAD

The question came up at my workplace: Will we benefit from having a workstation computer setup? The computers we tested had the following specs: Machine 1 CPU: Xeon E5 1650 V2 (3.5ghz) Video Card: Quadro K2000 (later upgraded to K4000) Hard Drive: SSD  Ram: ECC ram Machine 2 CPU:  i7-3820 (3.6ghz)  Video Card:  Geforce GTX 650 Ti Boost Hard Drive:  WD2500HHTZ HD (single; not raided) Ram: Non-ECC ram The test we ran was the CADalyst benchmarks (http://www.cadalyst.com/benchmark-test). The results were surprising. The following were the findings (please excuse the loss of the graphs; images were lost from this blog): There was no 2d graphics index difference between any of the video cards. There was no CPU score difference between the CPUs as well. There was a slight difference in the single loop test for file loading speeds. However, over several loops, difference evaporated. ECC Ram did not seem to have any impact in any of the indices....

How to Bring in Geo-Referenced JPG of Google/Bing/Open Map into Civil3D

On July 13, 2013, Ishka Voiculescu posted a nice video on YouTube on how to bring in geo-referenced images of Google/Bing map (among other map sources) into AutoCad. What follows is step by step guide that you can follow at your own pace. The steps do not mirror what Ishka does in the video exactly but it's the same thing in the end. Step 1: Create a Geo-Referenced Image. Download Terra Incognita here. The nice thing is that it is portable; you can stick it in a usb key or in a network drive and run it from any computer without having to install it. Run Terra Incognita (simply referred to as "Terra" from now on). Choose a map source. Locate the area that you want and select the desired area. Choose the zoom level. This will determine the resolution of the image. Save the image by saving as an ArcView map. Step 2: Bring in the Image into AutoCad In AutoCad, set the coordinate system that you want the image to be brought into (e.g. using t...

Preventing the Navbar Plot

Autocad 2014 has an annoying tendency to print the navbar on every viewport. I thought they solved this problem with Service Pack 2 but it showed up again the other day. The problem is intermittent so I know I will forget about it until it happens again. I always plot by exporting to PDF first so I just created a custom command called "Export to PDF (Navbar Off)" and stuck "navbar;off;" in it. Hopefully it will keep me from forgetting about it, missing it and having a client staring at it wondering what the heck it is. But the Problem Isn't Over The major problem with the Navbar  plot issue is that when it's turned off, it can interfere with correct plotting of line weights. So you end up having to choose between line weights plotting right but navbar showing in the plot as well, or preventing navbar plotting but line weights also being messed up. Problem Doesn't Affect All Machines I don't know if it's a problem with .net files or w...

How to Change Block Scale in One Axis

Usually, a block can be distorted (scale changed on one axis more/less than another axis) by just changing the scale value on the property window. But a lot of blocks are created with "uniform scale" option on. The method that is traditionally used most often is to explode the block and recreate it with uniform scale off. Autocad, however, a pretty simple way to do this: the BSCALE command. You can change the scale absolutely or relatively. "Absolute" option scales the block relative to its block definition size. "Relative" option scales the block relative to its current size. So if you do a BSCALE/Absolute/1/0.5 twice on a 1m x 1m block, the final size will be 1m x 0.5 m. If you do a BSCALE/Relative/1/0.5 twice on the same block, the final size will be 1m x 0.25. To reset the block to its original size, just type in "1" in the "Scale X" box in the Properties window.

Effective Management of Project Folder Shortcuts

If we don't use a solid shortcut strategy, a lot of time is wasted looking around for things we need. To cut down on time wasted, a good practice is to coordinate the "Places" in Autocad file dialogue and the "Favorites" in Windows Explorer. The strategy is simple: Pick a place where you keep all your shortcuts (e.g. "c:\CAD Shortcuts"). This is your master shortcut folder. Add this folder to your Windows Explorer "Favorites" by right clicking of Favorites and selecting "Add current location to Favorites". Whenever you come across a folder you need to access often (such as a folder for one of your current projects), make a shortcut of the folder in Windows Explorer and move the shortcut to your master shortcut folder. Now you will have quick access to frequently accessed folders via your master shortcut folder. Next, in Autocad, use the Open command to pop up the file dialogue box. Navigate to your master shortcut folder. T...

A Handy Post-Crash Macro/Script

When Autocad crashes, the most common annoyance is that the file dialogue gets turned off. The second most common annoyance post-crash is that the noun-verb option gets turned off, forcing you to choose the command before selecting the target object. It's fairly easy to fix these annoyances but I find it handy to have a macro to do both that I stick on the custom toolbar, which executes FILEDIA = 1 and PICKFIRST = 1. If you want to automate it even further, you can stick it in a script and have Autocad run it every time it starts. To do so, do the following: Right click on the Autocad shortcut icon and choose "Properties".  Add " /b startup " to the end of the text in the "Target" box as shown in the image below. You will also want to change the "Start in" path to the folder that contains the script file (or place your script file in the existing "Start in" location).  Create a script file startup.scr somewhere. Put i...

"Produced by an Autodesk Educational Product"

Sometimes you will get a file or block from a client or a collaborator that will put big "educational version" watermarks around all four sides when you print a layout.(note: This issue was resolved partially in 2014 sp1 and completely in later versions, but is back with 2019). First, a disclaimer: This is not a guide on how to disable the watermark feature, to use an Autocad product bypassing licensing requirements, or any such thing. I assume that you have a valid licence, and that someone that you are working with does not, and you are trying to get rid of the watermarks to control the damage before you risk your other project files. The solution's pretty straight forward. First, export the drawing as a DXF. Then open up the DXF with the normal open (except choose DXF for your file type). Finally, overwrite the original DWG by doing a "Save As". If the original drawing came with XREFs you will want to do this for the XREF'd drawings as well. ...

Reordering ToolPalette Tabs With a Text Editor

Changing the order of the ToolPalette tabs is more hassle than it needs to be. This is because the tab order is set by when they were created; you can drag them around and reorder them but they will just reset themselves. There are two ways to go about reordering the tabs. One way is to recreate the palette with the tabs in the desired order. It works, but there is another way to reorder tabs and that's what I'll cover here. The following example covers reordering two tabs in a custom palette. Let's say I want to swap "New Features" and "New Services". The following are the steps: Go to the location of the tool palette files. Find the file AcTpCatalog.atc , turn off "read-only" attribute, and open it with a text editor (Notepad++ used for this example) Note that the whole file is on one line. This is how Autocad re-generates the file every time. Next step is to make this thing readable by adding a new line after every closing ...

How Can I Freeze the Alignment but Keep the Alignment Label?

Sometimes we will want to turn off the alignment lines but keep the stationing on like below: Doing this with layer-control doesn't work; Freezing an alignment will freeze the alignment label. Same with turning it off. What this means is that to hide the alignment lines but keep the alignment labels on, you have to do it through visibility settings in the alignment style. That is, you have to go into the alignment style dialogue, go to the "Display" tab, and turn off the light bulb for the things you want to hide. Additional notes on the subject: Usually I have an alignment style called "None" that already has everything set to not-visible so that I can hide an alignment quickly without messing up my standard alignment style. Visibility setting has the same icon as the layer on/off icon which I find misleading because they're not the same thing at all.

The XLIST Window is too Narrow!

The default width of the XLIST information window is quite narrow. If either the layer name or the drawing name is long, you may not be able to see all the layer information from an xlist. It's a lot easier to see the layer name if the dialogue box is set wider.  Here is how to change the width of the xlist dialogue box: Go to the following folder: C:\Program Files\Autodesk\Autodesk AutoCAD Civil 3D 2014\Express Open the file XLIST.DCL with a text editor. Look for instances of the following setting : text {         key = "sLayer";         width = 30;       } In each instance of the seeting, change the width value to something bigger. I use 150 myself. e.g.: : text {         key = "sLayer";         width = 150;       } Note that there are three instances of this setting in the fil...