Author Topic: DCL Table - Truncate string that's too long  (Read 589 times)

0 Members and 1 Guest are viewing this topic.

Ben Clark

  • Newt
  • Posts: 74
DCL Table - Truncate string that's too long
« on: January 19, 2018, 11:10:39 AM »
So I'm going the DCL table route. I know open and object dcl could probably handle it better but I've never used them and don't want to get into them right now.

I can't figure out how to truncate a string when it gets too long for its "column". The main reason is, I can't figure out how to measure character widths. Surely it's possible.

See below for Lee Mac's way of doing it. I've looked at his code and can't follow where he handles this.

VovKa

  • Swamp Rat
  • Posts: 992
  • Ukraine

Ben Clark

  • Newt
  • Posts: 74
Re: DCL Table - Truncate string that's too long
« Reply #2 on: January 19, 2018, 11:27:51 AM »
This must be the key then (no pun intended):

     tab_truncate = true;


Which then raises another question:
    Why do the Autodesk knowledge pages not actually tell you the full amount of available tile attributes? That one is not present in the list box page.

VovKa

  • Swamp Rat
  • Posts: 992
  • Ukraine
Re: DCL Table - Truncate string that's too long
« Reply #3 on: January 19, 2018, 11:44:34 AM »
Which then raises another question:
i'm afraid this one can't be answered here on theswamp  :embarrassed:

Ben Clark

  • Newt
  • Posts: 74
Re: DCL Table - Truncate string that's too long
« Reply #4 on: January 19, 2018, 11:50:36 AM »
Indeed.


A more realistic question: is there a better resource somewhere stating, in a more comprehensive way, the tile attributes available for different types of tiles?

VovKa

  • Swamp Rat
  • Posts: 992
  • Ukraine
Re: DCL Table - Truncate string that's too long
« Reply #5 on: January 19, 2018, 11:55:56 AM »
A more realistic question: is there a better resource somewhere stating, in a more comprehensive way, the tile attributes available for different types of tiles?
there's a table in the help file
AutoLISP Developer's Guide > Working with Programmable Dialog Boxes > Programmable Dialog Box Reference > Synopsis of Predefined Attributes

Ben Clark

  • Newt
  • Posts: 74
Re: DCL Table - Truncate string that's too long
« Reply #6 on: January 19, 2018, 02:07:08 PM »
Thanks.