Archive | Uncategorized RSS for this section

The National Map Viewer

There’s a great resource for those of you who use U.S. imagery in their projects. The National Map Viewer is a great resource. Also, be sure to check out Brian Hailey’s post from last year – An Alternative to Google Earth. He highlights the accuracy issue and provides some instruction for using the national map viewer (previously called seamless viewer). Brian includes a link in his article to a Being Civil post that provides detail for this issue. Check it out.

PhotoGeoDWG on Exchange Apps!

by Mark Stefanchuk, CADmanage.com

Photogeo Logo

Just a quick note to announce that PhotoGeoDWG is now available on the Autodesk Exchange Apps Store. Leave a comment, tell us how to make it better. PhotoGeo will run in AutoCAD 2012/2013 and Civil3D 2012/2013. And, did I mention it’s free? Our CADmanage.com help page has a link to the PhotoGeoDWGhelp.pdf (right click on the link to download the file).

Happy New Year!

by Seth Cohen, CADmanage.com

To all of our colleagues in the CAD industry, we extend wishes for happy holidays and a Happy New Year.

Managing Usability

by Mark Stefanchuk, CADmanage.com

[Update: Be sure to check out Kim’s comment – a great alternative using the F1 key and choose none. Thanks Kim!]

I’ve been debating whether or not to share this with my MicroStation peeps. I hesitate because I don’t like to admit that sometimes I don’t adjust to change as quickly as I should, but also because this example has some conflict with features in MicroStation V8i that we wouldn’t introduce normally, especially if we don’t have to. What am I talking about?

Earlier this year I was working with a client helping them upgrade from MicroStation 2004 to V8i SS2. Not as big of a jump from V7 to V8, but big enough. Things were missing and commands didn’t work the same way. Years ago we could rely on commands that were in the previous version to work the same way in the new version. Today, it’s not that way. And seriously, there are good reasons for change, like productivity gains. I’m all for that. In this case however, it was clear that the user base missed some of the key operations that made MicroStation, well MicroStation and not AutoCAD.

For example, in older versions of MicroStation when you were done with a selection created using power selector you would use the right mouse button to deselect (reset). In V8i you just use the right mouse button (a datapoint in the view). That’s seems pretty easy. But if you have been drafting for years using the same workflow not being able to use something so simple as the reset button to deselect a selection set can be really frustrating.

Now, I was the consultant and I really wanted my client to be happy so I fixed it. I built an MDL application that would watch for reset. When the user clicks reset any active selection set would be removed. The command is very primitive, but I thought I would share in case you might have a similar issue. There’s not much to it – comments below.

#include    <mdl.h> 
#include    <tcb.h> 
#include    <dlogitem.h> 
#include    <dlogids.h> 
#include    <rscdefs.h> 
#include    <mdlerrs.h> 
#include    <userfnc.h> 
#include    <global.h> 
#include    <mselems.h> 
#include    <accudraw.h> 
#include    <cexpr.h> 
#include    <math.h> 
#include    <string.h>

#include    "ps_resetcmd.h" 
#include    "ps_reset.h" 
#include    "fdf.fdf"

int goFlag; // a flag to watch for active commands that might conflict
// the event watcher
Private int monitorQueue ( Inputq_element *queueElementP ) 
{     
    char sCmd[256];         
    sprintf(sCmd, "%S", mdlState_getCurrentCommandName());     

    // Element Selection Active     
    if (strcmp(sCmd, "Element Selection") == 0)
    {
        goFlag = 0;  
    }

    // a quick a dirty way to watch for active command - be careful with upgrades because this might not be
    // supported in the future. - not very elegant but it works - I'm a little bull headed that way.
    if ((strcmp(sCmd, "Dimension Element") == 0) || (strcmp(sCmd, "Dimension Linear Size") == 0) 
        ||   (strcmp(sCmd, "Dimension Angle Size") == 0) || (strcmp(sCmd, "Dimension Ordinates") == 0) 
        ||   (strcmp(sCmd, "Change Dimension") == 0) ||   (strcmp(sCmd, "Drop Dimension Element") == 0)
        ||   (strcmp(sCmd, "Dimension Size Perpendicular to Points") == 0) ||   (strcmp(sCmd, "Dimension Diameter") == 0) 
        ||   (strcmp(sCmd, "Label Point Coordinate") == 0) || (strcmp(sCmd, "Dimension Symmetric") == 0) 
        ||   (strcmp(sCmd, "Dimension Half") == 0) || (strcmp(sCmd, "Dimension Chamfer Angle") == 0) 
        ||   (strcmp(sCmd, "Dimension Diameter Perpendicular") == 0) || (strcmp(sCmd, "Dimension Radius (Extended Leader)") == 0) 
        ||   (strcmp(sCmd, "Place Center Mark") == 0) || (strcmp(sCmd, "Dimension Radius") == 0) 
        ||   (strcmp(sCmd, "Dimension Arc Distance") == 0))  
    {   
        goFlag = 1; // the active command is a dim command so dont deselect on reset
    }  
    else  
    {   
       goFlag = 0; // ok to reset - conflict mitigated  
    }    

    // user clicked reset and conflict minimized so go for it
    if (queueElementP->hdr.cmdtype == RESET)  
    {   
        if (goFlag == 0)    
            mdlInput_sendKeyin ("powerselector deselect", 0, 0, NULL);
    }
    return INPUT_ACCEPT;
}

// command entry
int main () 
{     
    RscFileHandle   rfHandle;  
    goFlag = 0;

    mdlResource_openFile (&rfHandle, NULL, FALSE);

    if (mdlParse_loadCommandTable (NULL) == NULL)  
        mdlOutput_rscPrintf (MSG_ERROR, NULL, 0, 4);

    mdlInput_setMonitorFunction (MONITOR_ALL, monitorQueue);
    return  SUCCESS; 
}

The conflict was created by sending a command, i.e. powerselector deselect, when commands that you didn’t want to terminate using reset were active – like dimension commands. The easiest way to work around this was to set a flag. If one of the dimension commands is active then don’t deselect on reset. The code and compiled ps_reset.ma is on cadmanage.com/cadgurus. Put the ma in your mdlapps folder so it will load when MicroStation is loaded. You can also use the keyin mdl load ps_reset to load this app.

About Mark Stefanchuk: Mark is a VP and senior consultant with CAD Management Resources, Inc. He divides his time between developing innovative custom software solutions and helping clients navigate complex design automation environments. If you would like to find out how he can assist you with your design technology he can be reached by contacting us at info@cadmanage.com.

Information to Help You Better Manage Your CAD Environment

by Mark Stefanchuk, CADmanage.com

Information is the key. Without it we can’t analyze and resolve issues, or win funding for new initiatives. As a CAD Manager, one of the toughest things I had to do was present and support the business case for moving projects forward. It required formulating data in a way that each stake holder could understand. Often that was a monetary presentation other times it was technical. We need information that can help us to understand overall operations, as well as detailed data about each workstation. With information readily available we will have much better control of the CAD ecosystem and a better argument when we have to reach out to our boss for funding. Here are five things, pieces of information, that can help you manage your CAD environment.

Computer Names

Capture computer names to support automated deployments. If you have a small footprint this is easy enough to manage and you probably aren’t doing automated deployments – but can offer you insights when combined with other data. In larger environments, especially those with self service request centers knowing who has what software isn’t always that easy. Even if you have a small pool of licenses your installed base could be much larger. Automating license capture is necessary and can help you with the next deployment.

User Names

In addition to providing very granular usage stats, user names can also provide data on asset usage – shared and individual. Tracking user names per computer name can tell you how effectively you are using your hardware assets. And you may find there are opportunities to consolidate resources or in some cases pro-actively address maintenance issues for shared resources. You can extend usage monitoring to just about any asset including software. In large environments software deployment, including CAD software is often managed by a centralized IT department. In this scenario CAD Managers will quickly lose track of who has and is using critical software assets.

How can we capture username and computer name? In a small environment (say fewer than 10) you can just survey the team and catalog the data manually. In larger environments you will want to use automation to capture this data. A quick and easy way to do this is to add some code to your start up script or program. In VBA you can use the following…

   Dim sComp as String, sUser as String
   sComp = $Environ(“computername”)
   sUser = $Environ(“username”)

And a quick way to save this data is to just append it to a log file using the open and print statements. Check http:\\en.wikibooks.org\wiki\Visual_Basic\Files for details on writing text files. Of course a more sophisticated approach would be to use a SQL database or some other data system that you can query and report.

Version Audit

Going a step further in your intelligence gathering you might also consider capturing version dates on first tier software. These include your business critical applications – that is MicroStation, AutoCAD, Civil3D, and so on.  Version audits can help to avert support issues. For example, incompatible plug-ins.

In both MicroStation and AutoCAD VBA this is easy – it’s just a simple call to the application object.

Application.Version

 

In addition to analyzing support issues, version audits can also help with funding – as is the case with Adobe applications where each version counts as a license instance. In larger environments with self service software requests I’ve seen incorrect versions deployed and version audits can help identify workstations that need to be upgraded. For those of you working for a consulting shop, it’s not unusual to be running multiple versions because in these situations we tend to upgrade as users finish one project and are just starting a new project. So in this case we can use version audits to avoid potential production losses.

In smaller environments versions and software deployments are more easily managed, but if you’re managing a reasonably sized CAD ecosystem computer names, user names, and versions can provide better feedback from your CAD environment. And there are many other things you might want to consider tracking – hardware form factors, plotter usage, and user profiles – each provides valuable information and combined they can inform upgrade schedules, refresh strategy, and software management policies. I’ll investigate these more in future posts, but for now experiment with user, computer, and versions, and let me know what else you might want to track.

About Mark Stefanchuk: Mark is a VP and senior consultant with CAD Management Resources, Inc. He divides his time between developing innovative custom software solutions and helping clients navigate complex design automation environments. If you would like to find out how he can assist you with your design technology he can be reached by contacting us at info@cadmanage.com.

Launching External Programs and CADpilot

by Mark Stefanchuk, CADmanage.com

Yesterday I was looking at launching external applications from my favorite CAD programs. Launching standard Windows office applications are generally supported, but I wanted to see if I could launch an executable developed by someone other than Microsoft. Sure enough, there are several posts out there that document how to do this, but I thought it might be helpful to see how to handle it in both MicroStation and AutoCAD. And many of our CADpilot customers have asked the same thing, specifically “how do I launch an external application using CADpilot?” So, I’ve included a couple of CADpilot examples too.

MicroStation

In MicroStation this is easy. Use the “%” symbol before the application name. For example,

%snagit32

As long as snagit32.exe is found in a PATH folder the program will launch. If it’s not in the path then you can always be explicit. For example,

%"C:\Program Files (x86)\SDJElectra\SegmentTables\Program\segmenttables.exe"

The quotes are necessary because there are spaces in the path spec.

AutoCAD

In AutoCAD it takes a little more effort, but you can do it. The START command will launch most windows programs found in PATH. If it’s not found in path you will need to use the SHELL command. For example,

SHELL "C:\Program Files (x86)\SDJElectra\SegmentTables\Program\segmenttables.exe"

These will start a command window which then executes the request.

You can also set up an alias by editing the acad.pgp file. To open this file in Civil3d go to the Manage tab on the ribbon menu and click “Edit Aliases”. This will open the file in notepad. You can find more information on how to add aliases for external programs from the knowledgebase article, Starting Windows programs from the AutoCAD command line.

The interesting thing about the alias file is that it is user specific. If you do a Save-As from notepad you will see that the acad.pgp file is located in the users AppData folder. It will move with the user’s roaming profile, but everyone could have a different acad.pgp.

That’s great. It gives your users control over their personal CAD environment. On the other hand, you will have to do some planning if you, as the CAD Manager, make changes to this file and want to deploy it to everyone on the team.

CADpilot

A somewhat biased plug – this is one of the many reasons I like CADpilot. The user can create her own aliases and you can deliver program launch commands for the whole team, or for segments of your team to a single location. Also, since CADpilot is a delivery and deployment platform you can make global changes very easily without making users exit their design session.

Ok, so for those of you already using CADpilot, launching commands is really easy. You use the “cadpilot ui run” command. In MicroStation it will look like this,

cadpilot ui run snagit32

and for AutoCAD,

(cadpilot-ui-run snagit32)

If you need to spec the whole path then use the following format.

(cadpilot-ui-run "C:/Program Files (x86)/SDJElectra/SegmentTables/Program/segmenttables.exe")

In the editor it would look like this.

On my development menu I’ve just added it as a test – like this,

It looks the same in both MicroStation and AutoCAD, there’s no DOS command shell opened when the command launches, and I only had to deploy it to one location.

I also discovered, today, that I can add my own variables to cadpilot.ui.cfg file. I added,

MYPATHVAR = C:/mydevpath/

The new commands for MicroStation and AutoCAD,

You don’t have to exit the CAD application either, just reload the menu.

If you’re not already a CADpilot user, download the demo version from cadmanage.com.

About Mark Stefanchuk: Mark is a VP and senior consultant with CAD Management Resources, Inc. He divides his time between developing innovative custom software solutions and helping clients navigate complex design automation environments. If you would like to find out how he can assist you with your design technology he can be reached by contacting us at info@cadmanage.com.