PDA

View Full Version : Insert block over text



ccowgill
2009-04-07, 05:21 PM
Is there anyway to insert a block in a cell and have it be middle center justified, but still have text that is within that cell maintain location. Clear as mud right? I would like to stack the block ontop of the text. I'd like it to look like the attached screenshot.

The arrow is pointing to how I want it to look, the first box is how AutoCAD defaults positioning.

Capt. Computer Crasher
2009-04-07, 07:30 PM
Is there anyway to insert a block in a cell and have it be middle center justified, but still have text that is within that cell maintain location. Clear as mud right? I would like to stack the block ontop of the text. I'd like it to look like the attached screenshot.

The arrow is pointing to how I want it to look, the first box is how AutoCAD defaults positioning.

Try this: Create a block with a number attribute tag and insert the block into the cell.
Instead of adding text in the cell edit the attribute in the block in the cell.

To do this:
1)create block with number attribute in center of block.
2) highlight table cell where block is to go
3) Right-click, pick insert, then block
4) choose your block with number attribute, scale (or autofit), rotation, overall cell alignment (for this middle center)
5) hit ok and then the enter attributes box appears.
6) enter the number for your block and hit enter.
7) your block will be centered on the number in the cell.


to edit the number later

1) double click on the cell
2) follow steps 4-7 from above.

This was tested in AutoCAD2008. see attached file (file in 2007)

ccowgill
2009-04-07, 07:33 PM
the problem is, the numbers that come in our imported from an excel file, I was hoping to be able to try to automate it, maybe via a cell style or something

Capt. Computer Crasher
2009-04-07, 07:54 PM
what about a macro that inserts the block number block after the excel file is imported.
import the excel file, run the macro that would insert the block then use the number already in the cell as the attribute value then it clears the imported text from the cell.
it would not be that complicated to write.

ccowgill
2009-04-07, 08:03 PM
what about a macro that inserts the block number block after the excel file is imported.
import the excel file, run the macro that would insert the block then use the number already in the cell as the attribute value then it clears the imported text from the cell.
it would not be that complicated to write.
that would be perfect, I dont have time to look at it right now, but it does give me an idea where to start.

ccowgill
2009-07-20, 07:39 PM
I must be brain dead right now, I dont even have a clue where to start. When I insert the table from excel, I am just using paste special, should I be inserting it another way, maybe some how programmatically with something that will automatically insert the text? I may have an older program I can convert to accomplish this.

Capt. Computer Crasher
2009-07-20, 08:18 PM
I just had a thought of something. if you have 2009 does it not have the action recorder that you can use to create a quick macro to insert that block number in the other post pretty quickly.