Tuesday, July 22, 2008

A Large Utility Linetype

Let's apply the lessons learned in this post on Creating Custom Line types.

Let's create a special linetype for use with large overhead utility lines.

A line that looks something like this.



You can tinker with the size of the symbol and the exact spacing to get it looking exactly like you want.

First things first. You will need to define a Text Style. The reason we do this is because the tower symbol you see in the line is actually the capital "T" in a CAD font that comes with CG Software. The font file is called symap.shx


To define the text style, go to the Format Menu and select Text Style.




The Text Style Dialog box will come up.

Creating a new Text Style is a 4 step process.


Step 1. Select the NEW style button.



Step 2. Name the new style Map_Symbols
(It is very important that you spell this exactly
this way so you can copy and paste the text
located at the end of this tutorial.)



Step 3. Choose the Font Name you want associated with this Text Style.
(Be sure you choose symap.shx from the list.)


Step 4. Apply the changes then close the dialog box.



Now that you have the text style properly defined you are ready to work with the linetype definition file.

First you need to determine exactly where your linetype file is stored on your system. To do this go to the Format Pulldown menu and choose Linetype.




This should pull up the Linetype Manager Dialog box. Once there choose the Load button.




This will bring up the Load or Reload Linetypes Dialog box.
You will see the name of a line type file (extension lin) next to a button labeled File.

Choose the File button.



You can work with any linetype file you wish.
CG Survey 9 users should look for one called "CGSurv_9.lin"
Users of other versions should see a file with a similar name.


Pay attention to where this file is stored on your system.
We will need to open that file and make some changes.



Once you know the exact file name and data path
we are ready to open the file and make some changes.




As I mentioned in the previous post, be sure and open this file with a plain text editor NOT MSWord. I use Notepad for this. Start Notepad then Open a file.


We determined the location of the proper file just a bit ago so we would know exactly where to find the file.


Again, users of other versions of the software might find a slightly different name. This is the name of the file in CG Survey 9. If you don't see the file there check to see that Notepad is looking for all file types and not just text files.


Pay particular attention to any text in the file that is proceeded by two semi colons. This text is where the programmers leave users important information.

In this case we find a note telling us to make any changes need to be saved to the end of the file.




This must be an important message because here it is again.



Go to the end of the file and add these two lines of text. It should be fine to copy and paste from this post

*Major-Utility-Line
A,1,-.1,["T",Map_Symbols,s=.12,x=-.05,y=-.06],-.1

I know we covered this before, but lets take a moment or two to go over again exactly what this text means.


















You see now why we created the Text Style called Map_Symbols. Without that, this line definition won't look right.








I'm sure many (most?) of you will want to tinker with the various parts of the line definition to get the line looking exactly like what you have in mind. This should give you the information you need to do that.

Save the line definitions file and close Notepad.

Now you have to load the new line definition into your drawing.

Go to the Format Pulldown menu and choose Linetype.



From the Linetype Manager Dialog box choose the Load button.




Choose the File button.


Find the proper linetype file.
Highlight the linetype name "Major-Utility-Line" 1
choose OK. 2



Your new line type should now be a part of your drawing.


In a later tutorial I'll talk about how you save this file type to your prototype drawing so it is available when you open the program.

Larry P

Wednesday, July 16, 2008

Raw Data Graphic Viewer


One of the most overlooked yet very useful C&G functions is the Raw Data Viewer. This function is available in CG 7, 8 and 9 as well as the corresponding versions for AutoCAD.

The Raw Data Viewer allows the user to take a raw data file and "graphically view" the data. This viewing happens before any data reduction. The program doesn't do anything except show you a graphic representation of what the data will look like after it is reduced.


This is an extremely useful tool in finding blunders.

Here is an example of the Graphic Data Viewer file associated with some data from my office.

Figure 1.


My traverse points are drawn with a square. My traverse lines are drawn with red lines

My side shot points are drawn with a circle. My side shot lines are drawn with green lines.

Point numbers are shown. Traverse numbers are slightly larger than the side shot numbers.


So, how does it work? I'm glad you asked.

Start your CG program and open the CG Editor.

Open the raw data file you wish to view.

You can go to either the pull down menu under View>Graphic View (Figure 2.).


Figure 2.

Or you can choose the graphic view button from the toolbar (Figure 3.).

Figure 3.

Your data should be shown in a graphic form similar to what I show in Figure 1 above.

Next, pay attention to your Graphic View tool bar (Figure 4.). This tool bar will help you control the look of your graphic screen.


Figure 4.


The "Pan" button (Figure 5.) looks like a hand.

Figure 5.


Here is the "Zoom In" button (Figure 6.).

Figure 6.


Here is the "Zoom Out" button (Figure 7.).

Figure 7.



Here is the "Zoom Extents" button (Figure 8.).

Figure 8.



Here is the "Zoom Window" button (Figure 9.).

Figure 9.



Here is the "Zoom to Point" button (Figure 10.).

Figure 10.


This button allows the user to change settings (Figure 11.).

Figure 11.



This button refreshes the screen (Figure 12.).

Figure 12.

Using these functions the user can navigate around the screen enough to see if there are major problems with the data. If you have a significant blunder in your data it should be obvious.


As for changing the Graphics Options. The user can change most of the settings to suit your own tastes.

Here we see the Points Setting Tab in the Graphics Setting Dialog box (Figure 13).

Figure 13.


You see you can control many options including the symbol, color, size and label size for various types of points. Choosing options that fit your style may take some tinkering.


Next you can set various options for lines associated with types of data (Figure 14.) using the Trav/SSs Tab.

Figure 14.

When the user gets the settings adjusted to taste, I think they will find this routine most helpful.

When the user is finished looking at the data graphically, simply close the graphic data window and proceed with data editing or reduction.

Larry P



Saturday, July 12, 2008

File Save dialog box problem

I had a call from a friend with a problem. The problem was the file save (or saveas) dialog box wouldn't come up as it should.

We've all seen what happens when you save a file.



The Save Drawing As box opens so you can specify the data path and file name.



Like this:



My friend was seeing this in the command line rather than the dialog box:




Now I'm not going to pretend I instantly had the answer for this problem. I didn't. In fact, I'd never seen this problem before. But I was able to find out how to fix the problem.

My friend's computer had a system variable that had been reset. (We aren't sure exactly how or why. It probably happened when the system crashed.)

If you have this problem you can fix it. Type filedia in the command line.




When prompted, specify a new value. 0 = all actions happen in the command line, no dialog box opens. 1 = Save As Dialog box appears.

Larry P