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.
#28771 by Ted Blockley
Sun Oct 07, 2007 11:31 pm
The DCAL macro called Scrive has a "reflow" function that ceased working with version 12.02. Reflow takes text entities of any reasonable size and recombines them into a flowed column of text. With version 12.02 this stopped working correctly (v12.00 on the CD is ok).

The symptom is that the text created with reflow is located at the origin, the size is zero and the angle is also zeroed out. Can anyone shed any light on why this happens?

I'm a bit stymied, since the function itself continues to operate as expected, but the entities and their manipulation aren't what they should be. Here is the logic of the function and the troubleshooting done so far:

The macro copies the first text entity selected as the "model" for the column of text (using ent_copy).

The model entity is modified by updating the text string and location fields for each line of text in succession, with each being copied (again using ent_copy) and displayed in the drawing. At the end, the 'model' is discarded (ent_del). It may (or not) matter that the although model is added to and updated in the drawing database, only its copies are drawn on screen. This part still seems to work as it always has.

In v12.02, the model is created with text at zero height, thus the length of any line of text is also zero. I deduced this because the macro itself limits the length of any text to 255 characters and stuffing it with text totalling several hundred characters does generate multiple lines of text limited by the macro rather than the expected column margins. All are located at the origin (height being zero, the line feed is a multiple of zero), all with an angle of zero (reflow used to work at any angle).

The question is where did all the zeroes come from?

Any input would be appreciated.

Ted
#28904 by devinder
Wed Oct 10, 2007 2:33 pm
ent_init causes all parameters to be 0.

It seems to be the draw issue, effecting only the last entity. If one entity is selected then it being the last, gets undrawn. Could you confirm testing on multiple entities or picking one by one multiple entities.
#28922 by Ted Blockley
Thu Oct 11, 2007 1:54 am
Hi Devinder,

Thanks for taking the time to reply.

I'll look more into the draw issue, which, at worst, will cause a little bit of blinking on-screen.

The code in the macro use ent_copy to intentionally bypass ent_init, precisely to avoid having to individually set each field.

In each case, the resulting text strings are correct, but the .x, .y, and text size aren't.

Ted
#28928 by devinder
Thu Oct 11, 2007 8:04 am
Could you email to techsupport@datacad.com, a sample aec file that shows the problem.
#29050 by devinder
Mon Oct 15, 2007 8:17 am
We found the problem. In DataCAD we started checking entity parameters for its validity. An empty string in the text field was being considered as invalid and thus would not update database, after it was initialized with zeros. This has now been changed to check the height parameter. If this is being set to zero, this problem will continue, but as you say in your message you do ent_copy, so it will not be a problem.

The problem will be fixed in the next version.
#29365 by Ted Blockley
Mon Oct 22, 2007 12:32 am
Aha,

Expanded error checking certainly is a useful thing. Sorry my programming got snared in that one - thank you for the support.

Ted
#29366 by Ted Blockley
Mon Oct 22, 2007 12:53 am
Very Cool.

I just checked for an update, downloaded it and it sure does appear that Scrive's reflow is back to normal.

By the way, I think it is some kind of amazing feat that you (Datacad LLC) have accomplished by keeping so much of this old "legacy" DCAL code functional.

In my mind, it warrants more tribute than most people can imagine, because I'm sure that it has measurably added to your every effort to improve the core product.

Thanks so much.

Ted

Who is online

Users browsing this forum: No registered users and 6 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