Start a conversation

MSCAD 2002, 2004 - Adding Attributes to your Custom Symbols or Parts

Adding Attributes to your Custom Symbols or Parts

In some cases, it would be nice to have text automatically placed with your symbols, but have the ability to enter the correct and different text for each symbol. So how is this done, you ask?

The ability to add text to symbols, without having to go back and type and place it manually after the symbol is already on screen, is done by adding Attributes to the symbol.

In the example below we will create a very simple symbol and add 2 different attributes to it. Then we will place the symbol in a drawing, and show you how to edit or change the attributes in case you need to correct or modify the text.

1) The first step is to create a new drawing and place the lines and arcs to create your symbol. In this example we will draw a simple circle to represent a Sewer Cover.

This circle was drawn using the standard Circle command with a Radius of 2. The one trick to make it easier later to insert this symbol into a drawing comes from where the circle is drawn in this drawing. To make it easier for placing in other drawings, it is nice to have the symbol insert where you pick on the screen. To do this the circle will be drawn with the Center Point at 0,0,0. So in this case when the prompt asks for the Center Point you will type in 0,0,0 and then press enter. This means that the circle is centered on the X and Y axis and will follow the crosshair and be placed exactly where you pick on screen, in the drawing you are adding the symbol to.

2) Now that the circle is drawn, we need to add some attributes to it. These attributes may be describing such things as, Size, Date of Installation, Manufacturer, Depth, etc. In this example we are going to add 2 attributes, 1 to ask for the Size and the other to ask for the Date of Installation.

To do this we need to run the ATTDEF command. This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Symbols pulldown menu and pick on Define Attribute

MSCAD 2001 => Go to the Parts pulldown menu and pick on Define Attribute

You will see the following dialog come up on screen: Lets go through and explain each option on the dialog.

NAME: Every attribute must be unique and have a name or tag.

REQUEST: This is the question to be asked when the symbol is inserted, so you know which attribute is being asked for.

VALUE: This is a default value that the attribute can have. This can be left blank.

INSERTION POINT: This is the location in the symbol where the attribute will be placed. You may specify the exact location by X,Y and Z or use the interactive option to manually place the attribute in the symbol.

OPTIONS: You may specify the font to be used when placing the attribute text, along with it's height and rotation angle. (NOTE: The font must be defined in the part to be able to use it)

REFERENCE POINT: Based upon the insertion point of the attribute text, how will it be placed at the insertion point. Example: TL is top left of text, BL is bottom left, etc.

ALIGN, FIT, CENTER: these are the same option as normal text to control the placement and appearance of the text.

FLAGS: Invisible means the text is stored in the symbol but not displayed on screen. Constant means the Value, from above, will be used automatically without you having to confirm it and can NOT be edited later. Preselect means the means the Value, from above, will be used automatically without you having to confirm it and can be edited later if required.

Now that we know what the different fields are for, we will set our 2 up for this example.

2a) The first attribute will be to label the symbol with the Size of the man hole. Fill out the dialog as shown below.

The NAME of the attribute is SIZE.

The REQUEST asks us for the required man hole size.


The VALUE is defaulting to 1.5 M. Interactive allows us to place the attribute where we want in the symbol.


The OPTIONS are using a text style of LY100, which was setup prior to creating the symbol, in this drawing. The height and angle were selected based upon the size of the text desired and it's rotation on screen.


The REFERENCE POINT of BL was chosen as it is most common to start entering text in that manner.


No other options were selected.

When you pick the OK button you will then be able to place the attribute NAME around the circle, where the size is to be displayed, when the symbol is inserted into a drawing.

The NAME is placed on the screen, where you picked. When the symbol is placed in another drawing, the actual VALUE will be in this location.

2b) The second attribute will be to label the symbol with the Date of Installation of the man hole. Fill out the dialog as shown below.

The NAME of the attribute is DATE.


The REQUEST asks us for the Date of Installation.


The VALUE is defaulting to June 4 / 1987. Interactive allows us to place the attribute where we want in the symbol.


The OPTIONS are using a text style of LY100, which was setup prior to creating the symbol, in this drawing. The height and angle were selected based upon the size of the text desired and it's rotation on screen.


The REFERENCE POINT of BL was chosen as it is most common to start entering text in that manner.

PRESELECT is checked, this means the man hole will be labeled with the date showing in VALUE automatically, but it can be changed later if required.

When you pick the OK button you will then be able to place the attribute NAME around the circle, where the Date of Installation is to be displayed, when the symbol is inserted into a drawing.

The NAME is placed on the screen, where you picked. When the symbol is placed in another drawing, the actual VALUE will be in this location.

3) Now that we have our symbol and it's two attributes, we need to clean it up and save it as a symbol or part on the hard drive, so it can be inserted into other drawings.

If you have started a new drawing, as mentioned above, then we need to ensure that this drawing is clean and you are not going to insert other undesired items into the other drawings. Extra items such as layers, linetypes, fonts, etc. may be sitting in this drawing and if you simply save the drawing, they will be part of that drawing forever. This would mean that when you insert your symbol into another drawing, all of these extra items will also be inserted - and this makes larger and cluttered drawings.

To keep things clean we need to run the PURGE command. This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Edit pulldown menu and pick on Purge Drawing.

MSCAD2001 => Go to the Edit pulldown menu and pick on Purge Drawing.

When you run the PURGE command, you will see something like the output below. Answer the questions with ALL, *, and N as shown below. This will remove all unwanted and unreferenced items from the drawing. Your list may be slightly different than that shown below.

> purge
Purge unreferenced symbols (Blocks, Dimstyles, LAyer, LTypes, Textstyles or All):
All Names to delete <* = All>: *
Confirm each name? : N
Removing block STAMP
Removing block MMPOINTR
No unreferenced dimension styles found.
No entrys with name *.
No unreferenced layers found.
No entrys with name *.
Removing linetype CENTERLINE
Removing linetype DOTTED
Removing linetype HIDDEN
Removing linetype DASHED
Removing linetype BORDER
Removing linetype DASHDOT
Removing linetype DIVIDE
Removing linetype PHANTOM
No unreferenced text styles found.
No entrys with name *.

Now that the drawing is clean we can save it to the hard drive. You may type the command SAVE at the command prompt or go to the File pulldown menu and pick on SAVE or pick this button

found near the top left corner of the screen.

4) Now that the symbol has been saved to the hard drive, you may now use it in any other drawing.

You may exit out of the current drawing and go and either open another new drawing or open an existing drawing, your choice.

To insert the symbol we just saved to the hard drive, into this new drawing we need to run the INSERT command. This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Symbols pulldown menu and pick on Insert Symbol.

MSCAD2001 => Go to the Parts pulldown menu and pick on Insert Part.

The following dialog will come up - we need to locate the symbol we just saved to the hard drive so pick on the External button to search the hard drive.

After picking the External button the following dialog comes up. Now you can go and locate the symbol you wish to insert. Once you find it, pick on it once so it becomes highlighted, then pick on the open button to continue.

The location and name of the symbol will be placed into the previous dialog. To keep it simple, we are going to accept the defaults and press the OK button to insert the symbol (for more details on parts and the options available, you can check out our other technical notes)

As soon as you pick the OK button, you will see the symbol sitting on your cross hairs and it will move with them across the screen. Using standard picking options, select the location to place the symbol in the drawing.

Once you select the location on screen for the symbol, you will be presented with a dialog box asking you the questions you entered when creating the attributes. You will also see the default values you entered when creating the attributes.

To change them, simply pick on the question then enter the desired value in the bottom of the dialog. Once they are as desired, pick the OK button.

On screen you will now see the symbol with it's associated attribute values, as shown below.

5) OK, now that we have our symbol created and saved on the hard drive, and we have inserted into this drawing, we decide we need to change the original symbol in some way. How do we do this? First thing is to exit out of the current drawing without saving it. Then open the symbol drawing back up again. Now that it is open you may add additional attributes, if desired, or you may edit existing attributes. We already know how to add attributes so lets look at how to edit them.

To edit an attribute we need to run the ATTDEDIT command. This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Symbols pulldown menu and pick on Modify Attribute Definition.

MSCAD2001 => Go to the Parts pulldown menu and pick on Modify Attribute Definition.

You will be asked to Select an attribute definition: Go ahead and pick on the attribute you wish to edit. You will then see the exact same dialog as shown in step 2a or 2b above. Make your changes and then follow all the steps to save the symbol once again.

6) If you have inserted the symbol into a drawing and entered in the values for the attributes but made a spelling or entry error, you need to be able to edit the attribute to correct this. There are 3 commands that will permit you to edit the attribute values.

The first is the ATTXEDIT command. This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Symbols pulldown menu and pick on Edit Symbol Attributes.

MSCAD2001 => Go to the Parts pulldown menu and pick on Edit Part Attributes.

This brings up the same dialog as shown in step 4 above (last dialog in the step). Make your changes and pick OK.

The second is the ATTEDIT command. This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Symbols pulldown menu and pick on Modify Symbol Attributes (one by one).

MSCAD2001 => Go to the Parts pulldown menu and pick on Modify Part Attributes (one by one).

This command permits you to edit most of the items that defined the original attribute.

Make any desired changes and pick OK to save them. This can be done on each individual attribute on each symbol in the drawing, one at a time.

The third is the ATTVALUE command (which has ATTROT and ATTMOVE as sub options of the command, which can also be run on their own). This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Symbols pulldown menu and pick on Modify Attribute Text then pick on one of the 3 options .

MSCAD2001 => Go to the Parts pulldown menu and pick on Modify Attribute Text then pick on one of the 3 options.

The options are:

1) Edit Attribute Text Value (ATTVALUE)
2) Move Attribute Text (ATTMOVE)
3) Rotate Attribute Text (ATTROT)

7) There is another command available that will permit you to export the attribute values found in a job, out to a text file to use in reports or with databases. Being this is rarely done by our clients, we are not going to go into it in detail. Simply put, the command is ATTEXP. This command can be typed at the command prompt or be found by going to the following menus:

MapScenes => Go to the Symbols pulldown menu and pick on Export Attribute Information.

MSCAD2001 => Go to the Parts pulldown menu and pick on Export Attribute Information.

The following dialog comes up. It has the option to add different attributes and part properties to the text file it will generate. You select them by using the ADD/MODIFY and REMOVE buttons. The filename and location is specified and a preview of the information being placed in the file, is available from the DISPLAY button. Picking on OK will complete the command.

This command is not required by most people, but can be handy for others. Use at your own discretion. I hope this helps explain the major steps on creating, saving, inserting, and editing attributes in parts or symbols.


Created on: March 5, 2001

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Jason Poitras

  2. Posted
  3. Updated

Comments