Jump to content

Room Tag LISP Routine


rmjcorp

Recommended Posts

Have you ever used the A2A.lsp? it puts an area into an attribute within a block. I am not sure if I am allowed to post it on the board but that is what I am looking for with the insertion method.

Link to comment
Share on other sites

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • rmjcorp

    15

  • Tharwat

    14

  • Lee Mac

    5

  • irneb

    1

Top Posters In This Topic

Posted Images

What's that thing which is not being inserted correctly ??

 

You should read about functions first to know the differences between both of them ..

 

ssget (would allow you to use window selection to select many entities )

 

http://docs.autodesk.com/ACDMAC/2012/ENU/filesALRMac/GUID-9DA52C39-0A0D-48B4-82DA-D011D9EDC0E-212.htm

entsel ( would allow you to select only one entity )

 

http://docs.autodesk.com/ACDMAC/2012/ENU/filesALRMac/GUID-66C43B0D-85D3-49FF-8653-48ADA33817E-83.htm

Link to comment
Share on other sites

ok i will check it out. I actually was able to modify the A2A.lsp to be able to grab texts as well as polylines and it inserts it in to the block without having to re-insert the block. I still have to use 2 routines(1 for text attributes and 1 for the area attribute), but this way it allows me to pick a text and select the exact attribute I want it to replace(this way it goes where I want it to). If you would like to see it I will post it but like I said before I am not familiar with what can be posted on public boards or not. It was a LISP originally made by Lee Mac.

Link to comment
Share on other sites

1- should have attributed block which should have 3 attributes in it .

2- when invoking the routine , you should select texts to be inserted in the attributed block and which is going to be replaced with the attributes (texts).

 

Tharwat,

 

You are modifying the Attribute Definition objects (ATTDEFs) in the Block Definition (BLOCK), not the Attribute Reference objects (ATTRIBs) in the Block Reference (INSERT).

 

This is setting the Attribute Default Text for the Block Definition, not the Attribute Values for the single selected Block Reference.

 

We discussed this only the other day in this recent thread. :facepalm:

Link to comment
Share on other sites

Lee Mac,

 

Is there a way to add the to A2A.lsp, the ability to insert room number, employee name, and area? I dont mind if I had to run the routine multiple time by pressing space bar, however if I need to type alternate routines it can get annoying.

Link to comment
Share on other sites

Tharwat,

 

You are modifying the Attribute Definition objects (ATTDEFs) in the Block Definition (BLOCK), not the Attribute Reference objects (ATTRIBs) in the Block Reference (INSERT).

 

This is setting the Attribute Default Text for the Block Definition, not the Attribute Values for the single selected Block Reference.

 

We discussed this only the other day in this recent thread. :facepalm:

 

Hi Lee .

 

That discussion was not completed to end and my post No# 17 in that thread shows clearly my direct ask to it, and when it is supported with your marvelous examples I did lost in them since they are much and and my question was to know the differences . :)

 

Regards,

 

Tharwat

Link to comment
Share on other sites

Is there a way to add the to A2A.lsp, the ability to insert room number, employee name, and area? I dont mind if I had to run the routine multiple time by pressing space bar, however if I need to type alternate routines it can get annoying.

 

Yes, I could probably make those modifications - but not on voluntary time.

 

Lee

Link to comment
Share on other sites

That discussion was not completed to end and my post No# 17 in that thread shows clearly my direct ask to it

 

You wish to know the differences between an ATTDEF entity and an ATTRIB entity?

Link to comment
Share on other sites

You wish to know the differences between an ATTDEF entity and an ATTRIB entity?

 

Correct , According to your notifications to me about the attributes in general , I'd like to get it right and to know my repeated mistake with it .

 

Thanks

Link to comment
Share on other sites

The ATTDEF entity is the Attribute Definition and resides in the Block Definition (BLOCK in the Block Table). The Attribute Definition contains the Tag String, Prompt String and Default value of the Attribute. It is the entity that is created when you use the ATTDEF command.

 

The ATTRIB entity is the Attribute Reference and resides in the Block Reference (INSERT). This entity has only a Tag String and Attribute Value (or Text String).

 

There may be many Block References (INSERTs) inserted in the drawing, but only one Block Definition for each block name. Similarly, there are ATTRIB entities in each Attributed block inserted in the drawing, but each of these reference a single ATTDEF entity in the Block Definition.

 

Think about it as the Block Definition (BLOCK) being the 'blue-prints' and the Block Reference (INSERT) being the 'construction', hence there is only one set of blue-prints but maybe many constructions created from the blue-prints.

 

To help illustrate the structure of an Attribute Block Definition and Attributed Block Reference, I have created an example program (attached). The program will create a simple block definition with a single attribute definition, then insert a reference of this definition at the Origin. The program will then list the DXF data of the inserted Block Reference, so that you may see the ATTRIB entity structure.

 

After studying the attached program, have a careful read of this post.

 

If you still have questions, ask.

 

Lee

BlockExample.lsp

Link to comment
Share on other sites

Thanks for the great efforts Lee , highly appreciated .

 

Now I realized the differences between the Attribute entity and attribute Definition when you have just mentioned in your esteemed last reply which is

The ATTDEF entity is the Attribute Definition and resides in the Block Definition (BLOCK in the Block Table). The Attribute Definition contains the Tag String, Prompt String and Default value of the Attribute. It is the entity that is created when you use the ATTDEF command.

 

The ATTRIB entity is the Attribute Reference and resides in the Block Reference (INSERT). This entity has only a Tag String and Attribute Value (or Text String).

 

Honestly I have been thinking that the attribute definition is the same as the one resides in a Block , which is of course completely different as you have explained .

 

Thanks a lot .

 

Tharwat

Link to comment
Share on other sites

Is there a possibility to create a routine that will allow me auto populate a specific room tag block with every element within a specified polyline.

here is what I would ideally want to have happen..

 

1. create a polyline around a room(as a boundary)

2. create text or mtext for items such as employee, employee ID #, Department, and Building

3. insert a block with fields for area, employee, employee ID #, department, and building

4. run LISP to auto populate fields in block

5. run extraction to pull data into tables or excel spreadsheets.

 

I have hundreds of rooms to perform this type of data management on and I would like to streamline the system a lot. I would be willing to pay someone to create this lisp if need be.

Link to comment
Share on other sites

  • 6 years later...

Hi There, I loaded the lisp you created and opened my drawing which contains multiple mtext which are height levels (e.g. 3.580). I created an attributed text with the 'tag' roomtag and then created a block of the attributed text called 'roomtag' when i use the lisp command it inserts the block but the value on the attributed text within the block remains empty. Am i doing something incorrectly?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...