PDA

View Full Version : Creating A New Table Linking It to DWG's



HybridAWD
04-17-2007, 08:48 AM
Here is the Goal:
To create a new table that holds the block information for drawings that can be linked to the database and globally changed.

I have done this a long time ago with a table that has already been created. However, I would prefer not to add an extra 40-50 columns to the doc_reg table.

For a better understanding:
Our drawing name appears on our title block which has the attribute of DOC_NAME. That is currently linked back to the DOC_REG under a column DOC_NAME. So obviously anything in that field for that drawing will update in the title block.

Now how do I link the new table back to the DOC_REG and or is linking the table even needed?

dave
04-17-2007, 09:42 AM
How are you going to link the titleblock attributes to the database?

HybridAWD
04-17-2007, 09:58 AM
How are you going to link the titleblock attributes to the database?

If you explode my title block, you will see the exactly what is in the picture attached. All I did for one project was added in the same attribute name under Doc_Reg. Then it automatically updates. I would just prefer to put everything in 1 new table so I can copy over to other projects with ease.

So far we have everything figured out, now we are just trying to make it to where we can update through the Doc Manager. We have the fields showing up, however, if you update 1 it doesn't update them all. We need to fix the link between the doc manager and where it saves the information to the db.

tw_echo
04-17-2007, 04:48 PM
Have you update the AT_DWG_NAME view to include your new table? I am assuming you have since the fields are appearing in DM.

So have you created a new table for your attributes?

You stated that 'if you update 1 it doesn't update them all', can you explain what you are trying to do there? Are you trying to update say rev0 for one drawing and have that value propagate to each drawing?

HybridAWD
04-18-2007, 05:31 AM
You stated that 'if you update 1 it doesn't update them all', can you explain what you are trying to do there? Are you trying to update say rev0 for one drawing and have that value propagate to each drawing?

the new table is created. And you are right on target with the updating rev 0

tw_echo
04-19-2007, 11:12 AM
Hybrid,
I have never tried this personally so I am sort of winging it here. I guess my first question would be: do you guys always have the same titleblock info (revs, check by, etc.) for all drawings in a project? I can see having some generic tiltleblock info like project number, etc but we always experience revs can occur on just one drawing. In this situation, what you are trying to accomplish will not work.
Next issue, do you have your titleblock table linked to the DOC_REG via a primary key, if so, what is your relationship? The scenario you suggested sounds like you need a 1 to many relationship where 1 title block record is associated with many documents. If this is the case you will need to add a TitleblockId foreign key to your doc_reg table and find some way of populating it everytime a new document is created.
I may be getting you get confused so I will stop now until you reply...

PeterJ
04-19-2007, 02:09 PM
Is all this about updating title block info ?
When I have the time (not the first weeks ...) I'll post some lisp routines that retreive info from doc_rev and from project.ini, allowing a fully automated title border.

HybridAWD
04-19-2007, 05:47 PM
yeah that is what we are attempting. We have most of it already "linked" but we're just playing with the idea to make it 100% linked to the DB that way updating it would be much more time efficient.

Packin31
04-20-2007, 04:23 AM
This is what I have done. Created a new table in PROJDATA called it TITLEBLK. In this table there is a field named "TBLK". The field is filled in with dwg. Then in the AT_VIEW "AT_DWG_VIEW" the TITLEBLK table is joined to DOC_REG.

See jpg's

I could never figure out how to pull in title block info from Document Manager.

dave
04-20-2007, 07:43 AM
Is all this about updating title block info ?
When I have the time (not the first weeks ...) I'll post some lisp routines that retreive info from doc_rev and from project.ini, allowing a fully automated title border.

Has it been two weeks yet? B)