Create a attributed table based on another block's attribute.

Create a attributed table based on another block's attribute.

jotaferrer
Advocate Advocate
1,364 Views
12 Replies
Message 1 of 13

Create a attributed table based on another block's attribute.

jotaferrer
Advocate
Advocate

Hello y'all, here I go again...

I need to create a table-like based on attributed blocks. It has to be that way because it's easier for me to check the data in excel.

So far, I "attout" the attributes and "attin" them in a table I have. But I want to do it in another way. It could be done in steps because I think this will be a tricky and hard lisp. I don't even know how to start, but there it goes:

 

If I could at least insert the block "TKTOP1" of the table using my csv file, it would be awesome!

I can totally change the attributes names if it's needed though.

0 Likes
Accepted solutions (1)
1,365 Views
12 Replies
Replies (12)
Message 2 of 13

pbejse
Mentor
Mentor

@jotaferrer wrote:

If I could at least insert the block "TKTOP1" of the table using my csv file, it would be awesome!

I can totally change the attributes names if it's needed though.


Where is the CSV file @jotaferrer ?

 

Message 3 of 13

jotaferrer
Advocate
Advocate

Sorry, I forgot to post the csv files...

0 Likes
Message 4 of 13

pbejse
Mentor
Mentor

To be clear, you wanted to insert a table [ "TKTOP1" ] 

Populate the table values [ "TKLINE" ]  from the CSV file and not from the existing blocks [ "tanklabr" [ on the drawing?

 

OR populate a table using the existing blocks of the current drawing?

 

Message 5 of 13

jotaferrer
Advocate
Advocate

@pbejse 

It'd be easier if I could to it right from the block inserted in the drawing, but the point is in some cases there are more than one block with all the same attributes. That's something I need to avoid.

 

So, to be clear, I want to insert the "TKTOP1" and populate TKLINE from the CSV I get from the drawing because I can not have repeated data in my table 😕

0 Likes
Message 6 of 13

pbejse
Mentor
Mentor

@jotaferrer wrote:

I want to insert the "TKTOP1" and populate TKLINE from the CSV I get from the drawing because I can not have repeated data in my table 😕


TKLINE csv/txt file basically has the same values  found on TKTABLE csv/txt file.

Are you wanting to user to select both or TKTABLE file is enough? 

OR

The only value needed from TKTABLE is the values for TKTOP1 and ignore the rest, the actual values are TKLINE block are from TKLINE file?

 

 

 

Message 7 of 13

jotaferrer
Advocate
Advocate

In fact, this is just a sample of what I need. When I work in the whole drawing I have several lines that I need to set by deck and board, that's why the values seems to be repetitive. 

 

Let me show CSVs files when the dwg is ready...

 

Maybe I'm confusing things:

 

1 - I insert the "tanklabr" block and fill the values manually.

2 - I attout every "tanklabr" and open the file "A" in excel.

3 - I insert "TKTOP1" and as many "TKLINE" and I need.

4 - I attout every "TKTOP1" and "TKLINE" in another "B" file and open it in excel.

5 - I fill the "B" file with the values from "A" file.

6 - I attin the "B" file to replace the attributes of "TKTOP1" and "TKLINE"

 

Let me know if I was clear enough, please

0 Likes
Message 8 of 13

pbejse
Mentor
Mentor

@jotaferrer wrote:

Let me show CSVs files when the dwg is ready...


I opened a real can of worms with that last question.

 

Now that we have more than one TKTOP1 data on that TKTABLE_Final file, are you saying now there are more than one table to insert? 

 

If thats a yes, What Tkline data belongs to what TKTOP1 table?  and from what file?

------------------------------------------------------------------------------------------------

I assume this are referring to the same data

TKTABLE_Final file

Line 107 | from Col 58 value is WINDLASS OIL TANK FILL WIND O F PIPE 01 DECK STBD

 

TKLINE final file

Line 44 | from Col 39 value is  WINDLASS OIL TANK FILL WIND O F PIPE 01 DECK STBD

------------------------------------------------------------------------------------------------

Or are you building one central table for all values from tanklabr , if YES whichTKTOP1 from TKTABLE_Final data will be use for TKLINE block or is it from TKLINE final file?

 

EDIT: I did not see your edited response there 

 


@jotaferrer wrote:

Maybe I'm confusing things:

Let me know if I was clear enough, please


No not really  Lol.png

 

 

Message 9 of 13

jotaferrer
Advocate
Advocate
Man, I'm handling with these worms for too long also haha

I'm trying to think in a simple way to solve this...
What if we forget about CSV files and:

"ssget _X" "tanklabr"
insert a "TKTOP1" for Main Deck
insert a "TKLINE" and fills it with "tanklabr" filtered values by the TYPE > DECK > BOARD) until it ends
after that a "TKTOP1" for 01 Deck
insert a "TKLINE" and fills it with "tanklabr" filtered values by the same TYPE > DECK > BOARD) and so on

I can organize its visual manually, this is not a big problem. The main thing for me is what I said above, forget about the other big worms I've said before xD
0 Likes
Message 10 of 13

pbejse
Mentor
Mentor

Sold!  We will do it that way then.

 

Message 11 of 13

jotaferrer
Advocate
Advocate
Yay! Thanks for your big patience xD this is really freaking me out!!!
0 Likes
Message 12 of 13

pbejse
Mentor
Mentor
Accepted solution

@jotaferrer wrote:
Yay! Thanks for your big patience xD this is really freaking me out!!!

Here you go

 

Command: Labelinglist

Enter Type [Manhole/Pipe]: P
Pick table insertion point

 

Command: Labelinglist

Enter Type [Manhole/Pipe]: M
Pick table insertion point

 

Refer to attached lisp file [ LabelingList.lsp ]

 

HTH

 

Message 13 of 13

jotaferrer
Advocate
Advocate

Thank you so much! I'm going to spend a lot of time studying this awesome lisp, dude! You roooock!

0 Likes