TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: PKENEWELL on December 12, 2018, 02:03:02 PM

Title: (vla-put-TitleSuppressed) has no effect on table or table style
Post by: PKENEWELL on December 12, 2018, 02:03:02 PM
I'm working on an application that creates an AutoCAD table. I have tried to suppress the Title row on both the Table and the TableStyle using "(vla-put-TitleSuppressed tblobj :vlax-true)" and it seems to have NO effect on the table or tablestyle whatsoever.

Anyone else experienced this or have any ideas?

Running AutoCAD 2019, 64B
Title: Re: (vla-put-TitleSuppressed) has no effect on table or table style
Post by: kpblc on December 12, 2018, 02:23:23 PM
Try to update table or fully regenerate dwg
Title: Re: (vla-put-TitleSuppressed) has no effect on table or table style
Post by: Lee Mac on December 12, 2018, 02:35:48 PM
The titlesuppressed property will change the Title row to a Header row or Data row (depending on whether the headersuppressed property is set) and the row will then inherit the corresponding properties as configured in the Table Style assigned to the table for that row type; changing the value of this property will not unmerge the cells, as merging cells is not a property of the row type.

Observe:
Code - Auto/Visual Lisp: [Select]
  1. _$ obj
  2. #<VLA-OBJECT IAcadTable 000000002eed8488>
  3. _$ (vla-get-titlesuppressed obj)
  4. :vlax-false
  5. _$ (= actitlerow (vla-getrowtype obj 0))
  6. T
  7. _$ (vla-put-titlesuppressed obj :vlax-true)
  8. nil
  9. _$ (= actitlerow (vla-getrowtype obj 0))
  10. nil
  11. _$ (= acheaderrow (vla-getrowtype obj 0))
  12. T
  13. _$ (vla-put-headersuppressed obj :vlax-true)
  14. nil
  15. _$ (= acdatarow (vla-getrowtype obj 0))
  16. T
Title: Re: (vla-put-TitleSuppressed) has no effect on table or table style
Post by: PKENEWELL on December 12, 2018, 02:51:17 PM
The titlesuppressed property will change the Title row to a Header row or Data row (depending on whether the headersuppressed property is set) and the row will then inherit the corresponding properties as configured in the Table Style assigned to the table for that row type; changing the value of this property will not unmerge the cells, as merging cells is not a property of the row type.

Thanks for the Info Lee.

I am not sure how to do what I want at this point. I have tried "(vla-deleteRows tblobj 0 1)" and I just get an "Automation Error: Invalid Input". Am I entering this incorrectly, or do I have to unmerge the title row after suppressing? How do I unmerge the title row?
Title: Re: (vla-put-TitleSuppressed) has no effect on table or table style
Post by: PKENEWELL on December 12, 2018, 03:00:22 PM
OK - I think I figured it out! Had to Suppress the Title, then used (vla-UnmergeCells). Then just changed my row start number. Now it is working!

Thanks again!