Jump to content

Recommended Posts

Working to standardize a bill of material drawing that must consist of nothing more than text, lines, and blocks for a client that refuses to use datalinks and I was hoping to find a way to create a standard block that could act as a row in the table with cells containing text fields. Essentially, I would like to have the functionality of attribute definitions but have them copy down using some kind of array action. Has anyone had any luck/experience with something like this? I understand it's might be kind of impossible.

 

Attached is what I'm hoping to have as default text in the newly generated row as the user pulls down the array arrow. 

image.thumb.png.c79e249209a710d3cc208ac191427747.png

Link to comment
Share on other sites

Welcome to the forum.

 

Honestly, I'm having trouble understanding what it is you're trying to do. Where is your data coming from? What are you wanting to produce? Do you need a table or rows of blocks or an array? The more information you can give us, the better we can help.

Link to comment
Share on other sites

Definitely! Sorry for any ambiguity. Unfortunately, the information would be entered manually by someone pulling from an excel spreadsheet. In the past, we've just used rectangles and lines to create a rudimentary table which works fine but we often have issues with alignment as the drawing is iterated upon. I'm trying to put this together with the hope that we could standardize the rows to prevent things looking sloppy.

 

To answer your questions more concisely,

  • Data is manually entered by a junior drafter
  • I'm hoping to produce a dynamic "row" block that can be duplicated down and continually filled with default text that can be accessed and filled without exploding the block
    • This is what I'm able to get with my rudimentary block. The top row is using attributes which I understand can't be "duplicated" within the same block so I was curious if there were some other kind of text object that could be copied down using the "array" action within the block to fill in n number of rows going down.
    • image.thumb.png.1089b3484fe01460884e7e3362ead356.png
  • I only need rows, I'm happy to just copy and paste a row to create columns.

 

Link to comment
Share on other sites

The object "Table" exists for this type of function request. They can be customised as required, reading 200 blocks sorting and counting, then make a table not a problem. In simplest terms, select blocks and a table is made showing all attributes. 

 

image.png.0bc893efea8e93c20aed2bad7f17fda5.png

Edited by BIGAL
Link to comment
Share on other sites

If your junior drafter is entering data into a spreadsheet, you can easily import that data into your drawing as a table. Also (correct me if I'm wrong) you can update or replace the table if the spreadsheet changes. It's a fairly simple process. You don't need blocks or attributes, unless they are somewhere out in your plan. Don't make it more complicated than it has to be.

Link to comment
Share on other sites

Thank you all for the info! Put together a rudimentary table that ended up doing the trick. Think I was a little ignorant to how the AutoCad tables act/how to get them to conform to my clients needs!

Link to comment
Share on other sites

There is a huge amount of variables that you can set in a table to make it look the way you want, so just ask if your having to manually edit the default table to suit. Like Cyberangle can read a Excel and make a table and the opposite export a table to Excel.

 

.table to excel.lsp

Edited by BIGAL
Link to comment
Share on other sites

8 hours ago, Danielm103 said:

How about setting up a table style?

 

You have to be careful about formatting the cells. There are three different styles, one for the Title, one for Headers, and one for Data. It's easy to get them mixed up.

 

Once you have a style, you can use it anywhere. Put it in a template, transfer it with the Design Center from drawing to drawing, drag and drop, or cut and paste.

Link to comment
Share on other sites

Danielm 103 yes can make a table style I use a VL method not a entmake bit easier to read and work out what is happening. A couple of buggy things you can set number of columns but not widths, only a default width for all, so have to reset column width after making the table. Can use (command "table"... or Vla-addtable.list of methods for a table.txt

 

Just ask for any item you need I have used a few but no expert.

 

(setq docObj (vla-get-activedocument (vlax-get-acad-object)))
(setq tblStlObj (vla-addobject (vla-add (vla-get-dictionaries docObj) "ACAD_TABLESTYLE")
   "myTableStyle"
   "AcDbTableStyle"
    )
)
(vla-put-horzcellmargin tblStlObj 0.0)
(vla-put-vertcellmargin tblStlObj 0.0)
(vla-settextheight tblStlObj actitlerow 200)
(vla-settextheight tblStlObj acheaderrow 200)
(vla-settextheight tblStlObj acdatarow 200)

; add lots more
(setvar 'ctablestyle "myTableStyle")

 

 

 

 

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