Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Attribute Extraction of Blocks in Layouts?

leslie.lees
Advocate

Attribute Extraction of Blocks in Layouts?

leslie.lees
Advocate
Advocate

Is it possible to Extract block info if the same block is in different layouts? That is, can I define a particular layout from which the attributes within a block are extracted?

 

The issue I'm talking about is the my Title block and all attributes (in a layout), which would only be defined by an attribute tag called dwg number, assuming of course that my layout name is the same as my dwg number...... there could be lots of the same block....

 

Thanks Peeps ๐Ÿ˜„

 

Regards

Les

0 Likes
Reply
Accepted solutions (1)
1,540 Views
11 Replies
Replies (11)

pendean
Community Legend
Community Legend
Are you trying to capture sheet numbers across all of your layouts?
Do you use SSM (SheetSetManager)?
0 Likes

leslie.lees
Advocate
Advocate

Hi pendean, Yes & No.

My title block has roughly eight attributes with one Tag named 'SHEET' I set SHEET  to the DWG number starting at '001' incrementing per layout. I set the layout name the same as the DWG number as is standard practice at our works.

 

Upon playing with this I find that it only seems to work with one block and have only been able to get other titleblock SHEET values by switching layouts manually.

 

I haven't found a use for SSM as yet..... pray tell ๐Ÿ˜„

 

Regards

Les

0 Likes

steven-g
Mentor
Mentor
Accepted solution

How are you extracting the information, if you use the "attext" command then from within Model space when it asks for you to select objects use the keyword "all" and it will include items in all layouts as well as Model space objects.

leslie.lees
Advocate
Advocate

Ah perfect, I was using the dialog box and after choosing my template & Output location just hit 'OK'

 

Many thanks ๐Ÿ˜„

 

Regards

Les

0 Likes

leslie.lees
Advocate
Advocate

Actually although it works the result is erratically with between 0, 1 and all layouts included in created file......

 

BL:NAME  			C040000 
SHEET 				N003000
DESCRIPTION_LINE1		C040000
DESCRIPTION_LINE2		C040000
DESCRIPTION_LINE3		C040000
REVISION			C003000

Heres the template (with an extra carriage return at bottom)

 

& Heres the script I'm using...

 

-ATTEXT
o
All

c
U:\SCR\MyTemplate.txt

with two extra carriage returns at the bottom.  I need longer to play with this but I fear it could be the Output file path not being defined. Not sure yet.

 

Regards

Les

0 Likes

steven-g
Mentor
Mentor

Your information looks fine, could you post a dwg file, maybe someone could figure out what is going on.

0 Likes

leslie.lees
Advocate
Advocate

Yep, Can

Command: -ATTEXT
Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>: o

Select objects: All
187 found
122 were not in current space.

Select objects:
Enter attribute extraction type [Cdf/Sdf/Dxf] <C>: c

Enter template file name <U:\SCR\MyTemplate.txt>: U:\SCR\MyTemplate.txt
Enter extract file name <P:\Leslie Lees\Templates\SCR_EXTRACT_Test>:
0 records in extract file.

This is what I get in the command window (F2)....

& here's a file (had to remove sensitive material to comply with works policy)

 

Regards

Les

 

 

 

 

 

0 Likes

steven-g
Mentor
Mentor

It looks like the attext command in a script won't work for blocks outside model space, very strange.

0 Likes

leslie.lees
Advocate
Advocate

Mmm... although I don't get the same results using the Tools> Attribute Extraction dialog window??

 

F2 gives this....

 

Command: _attext
Select objects: all
187 found

Select objects:
** Invalid field specification:

Maybe the Invalid Field is because thet blocks are outside the model space as you say...but I initially had it working after your post suggesting using the 'All' keyword option!!

 

Regards

Les

0 Likes

leslie.lees
Advocate
Advocate

Only seems to work using dialog box...

results....

Command: _attext
Select objects: all 187 found

Select objects:  6 records in extract file.

Using the Script....

Results...

Command: -ATTEXT
Enter extraction type or enable object selection [Cdf/Sdf/Dxf/Objects] <C>: o

Select objects: All
187 found
122 were not in current space.

Select objects:
Enter attribute extraction type [Cdf/Sdf/Dxf] <C>: c

Enter template file name <U:\SCR\ATT_EXTRACT_TEMP.txt>: U:\SCR\ATT_EXTRACT_TEMP.txt
Enter extract file name <P:\Leslie_Lees\Templates\SCR_EXTRACT_Test>: P:\Leslie_Lees\DWG_LISTS\AttributeList.txt
0 records in extract file.

Regards

Les

๐Ÿ˜ž

0 Likes

steven-g
Mentor
Mentor

Exactly, and if you place a block in model space the script does work, so the problem isn't with the script, it is how attext works from a script

0 Likes