Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Modify Table Column Widths
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Does anyone know how to modify the column widths of an ACAD_TABLE?
I have known co-ordinates that I want each grip for the table to be set at. I can't just copy and paste the table from drawing to drawing. Each table of each drawing have different textual values, and the column widths will best be sized for each text value.
Thanks,
KP
Solved! Go to Solution.
Re: Modify Table Column Widths
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
If using dxf methods (entget, subst, and entmod), then the column width dxf is 142 code.
If accessing object methods, use the setcolumnwidth method.
(setq o (vlax-enamd->vla-object (car(entsel)))) ;;select table and get table object.
(vla-setcolumnwidth o 0 4);;set the first column to 4 units wide.
Re: Modify Table Column Widths
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
You can check this link: http://adndevblog.typepad.com/autocad/2012/04/auto
Gaston Nunez
Re: Modify Table Column Widths
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I get the following error using the "SetColumnWidth" method.
Select object: ; error: no function definition: VLAX-ENAMD->VLA-OBJECT
For anyone doing a search on this, it should read (setq o (vlax-ename->vla-object (car(entsel))))
Using this method is way simpler than stepping through the 142 dxf codes.
Thank you so much.
KP
Re: Modify Table Column Widths
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
1.- (vl-load-com)
2..-(vlax-ename->vla-object (car(entsel)))
Gaston Nunez
Re: Modify Table Column Widths
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Yeah, the vl-load before is necessary.
Thanks for adding that, for the solution to the problem.
KP
