TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Visual DCL Programming => Topic started by: Ben Clark on January 19, 2018, 11:10:39 AM

Title: DCL Table - Truncate string that's too long
Post by: Ben Clark 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.
Title: Re: DCL Table - Truncate string that's too long
Post by: VovKa on January 19, 2018, 11:18:21 AM
https://www.theswamp.org/index.php?topic=53849.msg585091#msg585091
Title: Re: DCL Table - Truncate string that's too long
Post by: Ben Clark 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.
Title: Re: DCL Table - Truncate string that's too long
Post by: VovKa 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:
Title: Re: DCL Table - Truncate string that's too long
Post by: Ben Clark 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?
Title: Re: DCL Table - Truncate string that's too long
Post by: VovKa 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
Title: Re: DCL Table - Truncate string that's too long
Post by: Ben Clark on January 19, 2018, 02:07:08 PM
Thanks.