• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

insert date into a drawing with autocad 2004

  • Thread starter Thread starter neuroneimpazzito
  • Start date Start date

neuroneimpazzito

Guest
Hello.

with the rtext function (available by installing express tools) I managed to put in the drawing the full path of the file and the user name that saved as text lines.

remains the information of the date of the last rescue, I cannot use the field function because I have the version 2004.

using the tduupdate system variable I managed to set the year, allego code written in the rtext:
$(+,2010,$(fix,$(/,$(-,$(fix, $(getvar,tduupdate)), 2455198),365)))to understand it well I explore the line in detail:
variable $(getvar,tduupdate)
Universal days $(fix,$(getvar,tduupdate)))
Past days from 01/01/2010 $(-,$(fix, $(getvar,tduupdate)), 2455198)
number of years since 2010 $(fix,$(/,$(-,$(fix, $(getvar,tduupdate)), 2455198),365))
year $(+,2010,$(fix,$(/,$(-,$(fix, $(getvar,tduupdate)), 2455198),365))
I put myself to work at the alcohol of the month easily getting the days of the current year with the formula:
number of days of the current year $(+,1,$(-,$(-,$(fix,$(getvar,tduupdate)), 2455198),$(*,$(fix,$(/,$(-,$(fix,$(getvar,tduupdate)), 2455198),365)),365)))but to pass effectively per month it is necessary to put in row 11-12 conditions if to check whether the number of days is less than 31, 31+28=59, 31+28+31=90, etc. etc.

Januarycondition01 $(<=,$(+,1,$(-,$(-,$(fix,$(getvar,tduupdate)),2455198),$(fix,$(/,$(-,$(fix,$(getvar,tduupdate)),2455198),365)),31)
$(if, condition01, /01/ )
$(if, $(<=,$(+,1,$(-,$(fix,$(getvar,tduupdate)),2455198),$(*,$(fix,$(/,$(-,$(fix,$(getvar,tduupdate)),2455198),365)),365))))) , 31 ), /01/ )
January and Februarycondition01 $(<=,$(+,1,$(-,$(-,$(fix,$(getvar,tduupdate)),2455198),$(fix,$(/,$(-,$(fix,$(getvar,tduupdate)),2455198),365)),31)
condition02 $(<=,$(+,1,$(-,$(-,$(fix,$(getvar,tduupdate)),2455198),$(fix,$(/,$(-,$(fix,$(getvar,tduupdate)),2455198),365)),365))),59
$(if, condition01, /01/,$(if, condition02 ,/02/))
$(if, $(<=,$(+,1,$(-,$(-,$(fix,$(getvar,tduupdate)),2455198),$(fix,$(/,$(-,$(fix,$(getvar,tduupdate),2455198),365),
In short, the string stretches so much that I eventually get
(diesel evaluation failed).not to mention the calculation of the day of the month...

do you have any idea to simplify the calculation, for example using variables or using lisp, vb?

thanks, greetings
 
I think it costs you less to update the software and use the data fields. :wink:
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top