Adding new fields to the database
Adding new fields to the database is useful in cases were you more information about a component, but there is no corrosponding field in the database to the one in the specs.
If you know where your database is you can skip the first 3 steps> To create a new field in the database:
- Open the “Bentley Project Administrator”.
- select “yourProject->Database->Databases”.
- open the file path specified for “PROJDATA”.
- open the ProjData file in microsoft access.
- Scroll down to the table where your component data is placed.
- right click on the table and select “design view”.
- go to the bottom of the table.
- in the first blank row fill in the required columns.
- Column Name. This must be exactly the same as the field in the spec key or it wont be filled from the spec when a component is placed. You can also name a field that will not be inputed by the specs, but is inputed durring a draw or input function (ie a variable length that is taken as input and not from the spec).
- Data Type. This is selected from the dropdown menu.
- Length. This indicated the number of characters or digits long the field is.
- Allow Nulls. This indicates wether or not the field can be empty.
- Description (not required). The fields description.
- save and exit the access file.
Note: the new database field will be empty even for components that has the equivalent spec field filled. This occurs for all components placed before the field was added, these fields can be updated using spec update.
Note: the fields specified in the list are what shows up on the second page of the edit components dialogue box.
Setting fields to allow for users to update them
When updating from the spec’s you are ussualy limited in which fields can and cannot be updated, even when using the “update all data” method. This is caused by the write restrictions in the project administrator that determines which fields users can change. Sometimes we need to change the write properties for a fields.
For example, if we have just recently added a new fields to the database, but we have already placed many of the components that need that information. When the new field is added it is initialy set so that the user cannot update the field, which would leave all of the preplaced components without the required data. Thus we must change the field to allow for user input, then run a spec update on all of the preplaced components.
Changing the write permisions of database fields.
- Open the “Bentley Project Administrator”.
- Select “yourproject->database->databases”, this will open a list of the different database in the project.
- Select “PROJDATA” from the list and click the edit tables button, this will open a list of all of the tables inside of PROJDATA.
- Scroll down to the table that has the data of your components, for example when placing components from the Raceways or Piping menues the components will be placed in the piping table.
- Click the columns button, this will open a window that has a list of all of the fields held on the database, it should be noted that this does NOT always corrospond to the fields in the spec files.
- Scroll down to the field(s) which you want to change, click in the “Allow User Updates” column, then click on the down arrow button to change the field accessability from no to yes or from yes to no.
- once you have finished changing all of the desired fields click OK, then close the tables window for your changes to take effect. (Note: AutoPlant must be reopened for the changes to take effect if it was running while the changes were being made).
Being able to change which fields are changed durring a spec update can also be useful in cases where you want to update a dimension field for a component only once, such as the rung spacing on a type of cable tray.
Updating all data from Specs
To run a spec update on a component:
- in AutoPlant select Raceways->Database Tools->Update from spec
- use the selection method to choose the component(s) that you want to update
- when prompted choose the type of update you want to do to your component
- “Update all descriptive data”, this will update all of the database fields that allow user updates identified in the section above.
- “Update the long and short descrition”, this will update only the long and short description, they will not update if they are set so that they don’t allow for user updates.
- “Update the Manufacturer name”, only updates the manufacturer name, if allowed.
- “Update the sort Code information”, only updates the sort code number of the component.
- “update the port size”,only updates the port size of the component.
Note: Any fields that effect the dimensions of the component will be updated in the components information, but the physical appearance of the object will not change, to see the changes use the command AT_PIPING_3DREDRAW and selecting the components that you updated