Author Topic: Text Variables /Programmable text fields  (Read 630 times)

Rob S

  • Hero Member
  • *****
  • Posts: 4329
    • Construction Estimating Program for General Contractors
Text Variables /Programmable text fields
« on: June 08, 2016, 12:38:22 PM »
I have frequently requested in the past, but maybe never here in this part of the forum that we should have a way to insert a variable into a text field that displays things such as the date, the time, the filename, drawing information, items from the current material list, the username, etc, but this could be vastly improved by allowing a user to define basiccad expressions within a text field to display the results of any kind of calculation.

It might be necessary to have a way to turn off the updating of such expressions so as not to slow down the program while drawing.
User since Pro-design

Dr PR

  • Hero Member
  • *****
  • Posts: 5436
Re: Text Variables /Programmable text fields
« Reply #1 on: June 08, 2016, 08:40:33 PM »
Rob,

This is an excellent idea. Here are some thoughts.

1. The "date" variable can be a problem. I requested this for a schematic capture program and the programmers responded with a date variable formatted like this:

month:day:year:hour:minute:second

Of course this was useless. The date box in my customer's title blocks didn't have space for the hour:minute:second. Don't know what the bozos were thinking - guess they never saw a real schematic.

The "date" variable should be the date the file was last saved.

The user should be able to format the date variable to correspond to what the customer's company uses. I have seen these formats used:

DD/MM/YY                     01/08/16
DD/MM/YYYY                  01/08/2016
MM/DD/YY                     08/01/16
MM/DD/YYYY                  08/01/2016
YY/MM/DD                     16/08/01
YYYY/MM/DD                 2016/08/01
DD/month/YY                01/Aug/16
DD/month/YYYY             01/Aug/2016    1 Aug 2016 or 1 August, 2016
Month/DD/YY                Aug/01/16
Month/DD/YYYY             Aug/01/2016     1 Aug 2016 or August 1, 2016


Because some places use DD/MM and others use MM/DD the first six examples are ambiguous - you really don't know if it is 8 January or 1 August. Here in my town MM/DD/YYYY and DD/MM/YYYY are both used by different banks, and when I have mentioned this they assume everyone does it the way they do and seem to be totally unaware that others in the same town and same business use the opposite format! But I guess no one expects business types to be very bright.

2. The "filename" should not include the path. For this we need a separate "path" variable.

Filename is just the file name and type

The path should be the complete path to the folder/directory on the storage device containing the file, less the file name.

If you want the full path and filename you would use the variables

path/filename

3. The "time" variable should be the hour:minute:second the file was last saved. I think a 24 hour clock would be good enough.

If DT and company want to implement a 12 hour clock with AM/PM suffixes that would be OK.

4. A "logo" variable would be useful where the file name of a logo graphic could be assigned.

****

Other variables could be provided, but I don't know how useful these would be:

"title"
"subtitle"
"project"
"company name"
"drawn by"
"approved by"
"approved date"

Phil
DesignCAD user since 1987

Rob S

  • Hero Member
  • *****
  • Posts: 4329
    • Construction Estimating Program for General Contractors
Re: Text Variables /Programmable text fields
« Reply #2 on: September 06, 2016, 06:04:26 PM »

Bump, well, I do have something to add....

I think there should be several date variables including date modified, create date, current date, etc

Windows date formats could be used for this. 

Time (of day) could be a separate variable

We would have a footer line something like "@filename printed on @date(mmm/dd/yyyy) at @time(hh:mm)"

User since Pro-design

Lar

  • Hero Member
  • *****
  • Posts: 2542
Re: Text Variables /Programmable text fields
« Reply #3 on: September 06, 2016, 08:03:22 PM »
In the Text, Attribute and Multiline Text commands there is a button with a red arrow pointing down. Click this to enter the current date or time or filename. There is also an 'other' option for your dcad registration info (name and company) and you can add custom stuff.

In the multiline text dialog the red arrow opens to an extended characters set but up top there is another tab for these 'auto text elements'.

'Date' has 13 options, time has 3, filename has 3.

Note that these are not active variables, just shortcuts for text entities, so you would have to edit them when needed.

Lar
« Last Edit: September 06, 2016, 08:09:09 PM by Lar »

bdeck

  • Hero Member
  • *****
  • Posts: 815
Re: Text Variables /Programmable text fields
« Reply #4 on: September 09, 2016, 09:27:15 AM »
We would have a footer line something like "@filename printed on @date(mmm/dd/yyyy) at @time(hh:mm)"

Hi Rob,

Glad to see some support on this issue.

I have been pushing for this for over 10 years (starting on the old upperspace forum).  http://forum.designcadcommunity.com/index.php?topic=658.msg3322#msg3322

My idea was a little more formal, with less user interaction required.

Every DC drawing should print with a footer (or header, or other margin text) unless that feature is turned off. (other professoinal applications do that) Choosing the fields printed should require nothing more complicated than checking a box in Options.

DC users should not have to resort to extreme measures just to learn when a drawing was printed. Still, I suppose,  a macro is "marginally" better than nothing.  ;D

Best Regards,
bd

« Last Edit: September 10, 2016, 06:17:20 AM by bdeck »