Block Attribute Reference String

Block Attribute Reference String

Jake_CAD
Advocate Advocate
834 Views
11 Replies
Message 1 of 12

Block Attribute Reference String

Jake_CAD
Advocate
Advocate

My aim is for the ID attribute in the block below (attched) to show the following (as indicated in the Target image below);

 

  1. All of Loop (L) Field
  2. First 3 characters of Address (A) field

 

Is there a way to do this?

 

Block Attribute ref:

Jake_PCH_1-1743080605633.png

 

Target: 

Jake_PCH_0-1743080335845.png

 

0 Likes
Accepted solutions (3)
835 Views
11 Replies
Replies (11)
Message 2 of 12

pendean
Community Legend
Community Legend

@Jake_CAD Where would that information come from to feed those strings?

0 Likes
Message 3 of 12

Jake_CAD
Advocate
Advocate

Manual input into the Block Attributes

 

Jake_PCH_1-1743084817614.png

 

 

0 Likes
Message 4 of 12

paullimapa
Mentor
Mentor

But in your OP that screenshot seems to show the ID value is filled out as a Field (text with gray background). But now you’re saying that you are manually entering the ID value. Which is it?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 12

Jake_CAD
Advocate
Advocate

Hi Paullimapa,

 

The ID is a field pulling string(s) from 2 of the other block attributes (labeled L & A) - attributes L & A are manually entered. I essentially want the ID to be automatically filled out using a combination of manually entered attributes of L & A.

 

The screenshot showing the Field is a screenshot of the attached block, which almost does what I want it to do. However, I have only managed to get the ID field to pull the values from the other 2 block attributes by opening and closing it in block editor.

0 Likes
Message 6 of 12

paullimapa
Mentor
Mentor

Strange because when I insert the Fire Alarm block into a new metric drawing the ID is not rotated vertically but left horizontal and way down below the insertion point in the far lower left hand corner.

I also cannot get the ID to fill out by opening and closing the block editor.

paullimapa_0-1743104138787.png

paullimapa_1-1743104210831.png

paullimapa_2-1743104281719.png

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 12

Jake_CAD
Advocate
Advocate

Hi Paul, that is very strange!

That aside, it would be useful to ascertain if what I want to achieve is possible - ie. A block attribute using a field that references other (manual input) attributes in the same block. To help convey this intention, I have produced the below diagram;

 

Jake_PCH_0-1743157662885.png

 

0 Likes
Message 8 of 12

Simon_Weel
Advisor
Advisor
Accepted solution

Ahh them Attributes. Remember - an Attribute Definition is part of the Block Definition. The value of the Attribute is tied to the Block Insert.

I.e. while you could use the Attribute value of a Block Insert in a field, you have to manually make the connection between the two for every Block Insert.

0 Likes
Message 9 of 12

Jake_CAD
Advocate
Advocate

Hi Simon - thanks for your response. That makes sense and explains why it worked once the block editor was opened.

 

Any alternative suggestions that may help me achieve my aim would be welcomed!

0 Likes
Message 10 of 12

Washingtonn
Collaborator
Collaborator
Accepted solution

You might investigate inserting blocks including manual attribute inputs within a lisp routine which also combines into ID attribute or once blocks have been inserted, run a lisp routine to combine selected block attributes into ID attribute.

Another way could be by placing blocks, ATTOUT to excel, with an excel formula to modify/update attributes and then ATTIN to update existing block in AutoCAD.

0 Likes
Message 11 of 12

Jake_CAD
Advocate
Advocate

Hi Washingtonn, do you have any specific lisp routines that I could reference for this type of functionality?

0 Likes
Message 12 of 12

Washingtonn
Collaborator
Collaborator
Accepted solution

Here is a method (non-lisp) you can use to update the blocks after the initial manually enter data has been competed. A master file can be created which could import the raw data, modify it and output the results very quickly (with the press of an Excel button).

temp.png

 

0 Likes