Anyone on here use AutoCAD?
Author
Discussion

Derventio

Original Poster:

1,556 posts

128 months

Friday 9th April 2021
quotequote all
See thread title. I have a dynamic block problem/question/quandary.

Gary29

5,252 posts

129 months

Friday 9th April 2021
quotequote all
Yes, loads of us, fire away and I'm sure someone will have encountered the same issue before.

Derventio

Original Poster:

1,556 posts

128 months

Friday 9th April 2021
quotequote all
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.


Dave.

7,900 posts

283 months

Friday 9th April 2021
quotequote all
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).

Derventio

Original Poster:

1,556 posts

128 months

Friday 9th April 2021
quotequote all
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.

The problem stems from the fact there are two pieces of information on two different lines.

Mr Pointy

13,414 posts

189 months

Friday 9th April 2021
quotequote all
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 inthe Excel sheet.

Derventio

Original Poster:

1,556 posts

128 months

Friday 9th April 2021
quotequote all
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.

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.

Derventio

Original Poster:

1,556 posts

128 months

Friday 9th April 2021
quotequote all
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!

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.........

Mr Pointy

13,414 posts

189 months

Friday 9th April 2021
quotequote all
Jolly good, glad I could inspire you (pure fluke though).