Jump to content

Create a custom table using a script


whitehouse431

Recommended Posts

I am currently using AutoCAD LT, and I have been racking my brain trying to figure out how to create a table using a simple script. Is this even possible with LT, and if so, does anyone have any helpful advice?

Link to comment
Share on other sites

table

2

2

340000,130000

 

Well, forgive me for the simplicity of this. The step I cannot figure out how to perform is the actual inputting of data into each cell. I have only gotten as far as figuring out how to create the blank table, and cannot get any further. For example, I want to input the matrix [1,2;3,4] with the header "Table." Any help or reference direction would be greatly appeciated.

Link to comment
Share on other sites

Ok this is all possible. First off though, why the heck do you have insert coords at 340000,130000???

 

Anyways, to simplify my explanation, I am going to assume an insertion point of 0,0.. Got it? Good...

 

After the table is created, we will use the TABLEDIT command. The way this works, is the command asks you to pick a cell. Well not only can you pick a cell with your mouse, you can also specify ANY point that resides in the cell, which means we can do this at the command line!! SWEET!

 

Ok first of all, the insertion point of a table is the TOP LEFT corner. So your "cell" points will need to be relative to that point... First I made a table with 2 colums and 2 rows and inserted it at 0,0. I then hovered the mouse in the cells that i wanted to edit, and wrote down their info. I was then able to generate my script. Use this code as a start.

 

-table
2
2
0,0
TABLEDIT
1,-.3
HEADER
TABLEDIT
1.2,-.7
"CELL 1"
TABLEDIT
1.2,-1
"CELL 2"
TABLEDIT
1.2,-1.4
"CELL 3"
TABLEDIT
3.8,-.7
"CELL 4"
TABLEDIT
3.8,-1
"CELL 5"
TABLEDIT
3.8,-1.4
"CELL 6"

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