Pull dimensions from viewport(s) to table in paperspace

Pull dimensions from viewport(s) to table in paperspace

atrotto
Enthusiast Enthusiast
376 Views
4 Replies
Message 1 of 5

Pull dimensions from viewport(s) to table in paperspace

atrotto
Enthusiast
Enthusiast

Hello folks,

 

I am trying to write a script that pulls the dimensions (as a field) from objects that are in viewports (Clicking on the dimension while prompted for a certain axis is fine) and puts them into a table that is part of a block that's in paperspace, that should also be selected because there can be multiple of them on a layout. 

 

On the table, dim X is always 2B, dim Y is 2D, and dim B is 2F.

 

I don't even know where to start with this, in my research I see very little on editing existing tables. 

0 Likes
377 Views
4 Replies
Replies (4)
Message 2 of 5

Sea-Haven
Mentor
Mentor

Post a dwg hard to know what is going on with out it.

0 Likes
Message 3 of 5

atrotto
Enthusiast
Enthusiast

Here's a super stripped down version, but it contains an example "shape" and the table it would be going into. 

0 Likes
Message 4 of 5

Sea-Haven
Mentor
Mentor

 A couple of comments/questions, are the shapes always rectangs ? If so a dynamic block or block may be useful, going back one step enter sizes, draw and dimension, second step is make layout then make a table with prior information. Each table must have a new ID for field objects. You can not use copy as it has the wrong field ID.

 

You can put a block in a table cell. 

 

I suggest before going further and doing the code like 3 times is there more objects than just the 2 rectangs ?

0 Likes
Message 5 of 5

atrotto
Enthusiast
Enthusiast

It's not just rectangles, it's a variety of shapes, and due to how we have a lot of "like" items, we frequently "save as" one dwg and make the edits to make it the new part. Which is why we have the table normally set up to have fields that are set by the dimension objects. I just want to streamline setting a cell on that table to a field that responds to a dim, because it takes quite a bit of time just to set up that field. 

0 Likes