Anyone on here use AutoCAD?
Discussion
I have created a custom toolbar for creating dynamic blocks for P&IDs. I use such a dynamic block for instruments. The type of instrument is selected using a visibility state. For example, if you chose a pressure transmitter, the top text displays PT but underneath that is an attribute for the item number, which the user can fill in. there are other visability states available that enable you choose local/remote control panel/local control panel options.
For example. If you choose local Flow Transmitter, the symbol looks like this:

All the symbols contain attributes for size, type, actuation (for valves), and an item number. I then use the ATTOUT command to chuck out a txt file which can be opened and edited in Excel. this enables the project engineers to quickly build a parts list, renumber etc, then I can use the ATTIN command to populate all of the blocks within a drawing.
My problem is, I cannot find a way of concatenating the "FT" with the "03001" within the block in a separate field. At present, the "FT" and "03001" appear in separate columns in the exported excel file. If I could join the two pieces of information together in a third attribute, I could map this to the "Item Number" column. Valves don't really have this problem because we use a prefix, MV????, AV????, PSV???? etc, so both parts of the item number appear in the same column.
I am trying to avoid having to rebuild the block from scratch, If I can help it.
For example. If you choose local Flow Transmitter, the symbol looks like this:
All the symbols contain attributes for size, type, actuation (for valves), and an item number. I then use the ATTOUT command to chuck out a txt file which can be opened and edited in Excel. this enables the project engineers to quickly build a parts list, renumber etc, then I can use the ATTIN command to populate all of the blocks within a drawing.
My problem is, I cannot find a way of concatenating the "FT" with the "03001" within the block in a separate field. At present, the "FT" and "03001" appear in separate columns in the exported excel file. If I could join the two pieces of information together in a third attribute, I could map this to the "Item Number" column. Valves don't really have this problem because we use a prefix, MV????, AV????, PSV???? etc, so both parts of the item number appear in the same column.
I am trying to avoid having to rebuild the block from scratch, If I can help it.
Before you change anything, ask which your engineers prefer.
If it was me, I'd prefer the number separate from the initial, so I could just click in a cell & smash in a number, rather than having to retype the initial/double click the cell, select the bit of text i'm replacing/click the cell, move mouse up to the formula bar etc (depending on how you use excel of course).
If it was me, I'd prefer the number separate from the initial, so I could just click in a cell & smash in a number, rather than having to retype the initial/double click the cell, select the bit of text i'm replacing/click the cell, move mouse up to the formula bar etc (depending on how you use excel of course).
Dave. said:
Before you change anything, ask which your engineers prefer.
If it was me, I'd prefer the number separate from the initial, so I could just click in a cell & smash in a number, rather than having to retype the initial/double click the cell, select the bit of text i'm replacing/click the cell, move mouse up to the formula bar etc (depending on how you use excel of course).
At present, the prefix doesn't get exported as they are not an attribute. I could make the initial a use defined attribute and just remove all of the visibility states but the way it is set up at the moment, the visability state auto fills in the description column. this means that the engineer doesn't have to keep typing in a description of the instrument.If it was me, I'd prefer the number separate from the initial, so I could just click in a cell & smash in a number, rather than having to retype the initial/double click the cell, select the bit of text i'm replacing/click the cell, move mouse up to the formula bar etc (depending on how you use excel of course).
The problem stems from the fact there are two pieces of information on two different lines.
Mr Pointy said:
Is this something you could sort out in the Excel sheet using the Concatenate funtion?

Export the Type & No as attributes & the Item No is automatically filled in the Excel sheet.
that is an option but I am trying to automate the output as much possible. The more stuff is already sorted for the engineers, the less chance of an error creeping in. The other problem is that in order for the ATTIN command to work, the native file needs to stay as a .txt file format rather than an .xls format. The text format does not allow some excel functions. Export the Type & No as attributes & the Item No is automatically filled in the Excel sheet.
Yes, I know there is a method of actually linking Excel tables to drawings but that only works for full AutoCAD. most of the engineers only have LT.
This is the only block where we have problems. All the other P&ID blocks I have created work a treat and have a) totally standardised our drawings and b) shortened the process of actually creating the P&ID drastically. Before I joined the company, they were drawing the symbols from scratch on every drawing!
I have posted the question on other dedicated forums but have drawn a blank so far.
Mr Pointy said:
Is this something you could sort out in the Excel sheet using the Concatenate funtion?

Export the Type & No as attributes & the Item No is automatically filled in the Excel sheet.
AHA! Thank you Mr Pointy! You have just given me a brainwave!Export the Type & No as attributes & the Item No is automatically filled in the Excel sheet.
I could redesign the other blocks so that the prefix (AV, MV, PSV, FILT etc) is a fixed attribute, controlled by the visibility state. I.E. If you call up a Manual Ball Valve, on the dynamic block, the MV portion of the text would appear as a fixed attribute and you would just have to change the following digits accordingly. Selecting an autovalve would automatically show AV etc. Because it is a fixed attribute, it can be exported to a "Prefix" column in the table with the next column being the Ident number.
That additional "Type" column in your example was the spark I needed. Thanks.
I just have to make the change to about 700 blocks, now.........
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


