The DataCAD Developer Network (DDN) is an online resource for information and support for DCAL® (DataCAD Applications Language) developers as well as anyone interested in creating fonts, toolbars, hatch patterns, or linetypes for use in DataCAD.
#77011 by Joseph Baron
Fri Sep 27, 2019 5:50 pm
Hello,
I'm looking for a way to get the length of a string up to 255 chars into an integer.

strlen() only handles 80.

So I convert the str char using ord() to get the integer and I find that ord() too only handles up to 80.

I'm hoping someone has a simple answer...
#77015 by Joseph Baron
Sat Sep 28, 2019 12:37 pm
I stand corrected on strlen() and ord(), thanks David.

It took some digging and I found that getPath and setPath are the limiting functions, it is GETPATH that only allows 80 chars:

getPath (path, PathLyr);

I hope you can prove me wrong on this one as well :D

The users that I have seem to use longer and longer path names and a recent event has prompted me to plug a fix to prevent it from happening again.

It looks like the next step is to write my own getpath255() unless it already exists...
#77026 by Joseph Baron
Mon Sep 30, 2019 1:18 pm
Thanks for your help David,

Your code is along the lines of how I was thinking.

I have notes from way back in 1995 that getstr() does not handle 255 chars. The most I could pack in the str today is 133 chars for some reason.
#77028 by Joseph Baron
Tue Oct 01, 2019 11:24 am
David,

Would you happen to have any updated information on getflname()?

It seems I've run into another 80 char limit that will have to be resolved to allow 255 chars.

Who is online

Users browsing this forum: No registered users and 38 guests

About DataCAD Forum

The DataCAD Forum is a FREE online community we provide to enhance your experience with DataCAD.

We hope you'll visit often to get answers, share ideas, and interact with other DataCAD users around the world.

DataCAD

Software for Architects Since 1984