Author Topic: I need help with datestamp.dvb in Autocad 2014 PLEASE  (Read 3204 times)

0 Members and 1 Guest are viewing this topic.

notredave

  • Newt
  • Posts: 140
I need help with datestamp.dvb in Autocad 2014 PLEASE
« on: June 29, 2016, 06:22:59 PM »
All,
I am in dire need of assistance. I have no idea about macros and dvb files but I have this datestamp.dvb file (attached) that is loaded every time a drawing is open or saved, I believe. My problem is that the drawing that this datestamp.dvb file was in originally was at 1-1/2"=1'-0". I scaled it down the drawing, border, to be 1=1, which was what it should have been from the start but someone else created it, I'm just cleaning up his mess. Well, now that string of text is huge at the bottom of the drawing. Evidently, once a macro or dvb file is run on a drawing, it remembers the original drawing size or something, I don't really know. Will someone be so kind to let me know how to fix this problem so I will know how to do it next time, if someone else has this problem, I will be able to fix it and look like a genius, LOL....I'm kidding. I'm so confused....

Thank you in advance,
David

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: I need help with datestamp.dvb in Autocad 2014 PLEASE
« Reply #1 on: June 30, 2016, 08:34:30 AM »
why not switch to something easier , like a FIELD or use PLOTSTAMP?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: I need help with datestamp.dvb in Autocad 2014 PLEASE
« Reply #2 on: June 30, 2016, 08:36:53 AM »
or go here and look at the portion where it sets text size and insertion point...

http://www.vbaexpress.com/kb/getarticle.php?kb_id=678


you will be much happier with a field...then you don't have to deal with anything external to autocad.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

notredave

  • Newt
  • Posts: 140
Re: I need help with datestamp.dvb in Autocad 2014 PLEASE
« Reply #3 on: June 30, 2016, 09:24:21 AM »
mjfarrell,
Thank you very much for trying to help me!
I can not manipulate the file, it's for Exxon and that's what I have to use and is used for Exxon drawings. It is loaded in acaddoc.lsp automatically.
I just need to know what and how to edit to have this particular drawing that went from 1-1/2"=1'-0" to 1=1
Thanks again!
David

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: I need help with datestamp.dvb in Autocad 2014 PLEASE
« Reply #4 on: June 30, 2016, 09:46:30 AM »
mjfarrell,
Thank you very much for trying to help me!
I can not manipulate the file, it's for Exxon and that's what I have to use and is used for Exxon drawings. It is loaded in acaddoc.lsp automatically.
I just need to know what and how to edit to have this particular drawing that went from 1-1/2"=1'-0" to 1=1
Thanks again!
David

You will need to edit the DVD project to insert the that date stamp at correct location and size...
not sure if it is same name as the example I linked you to, or something else...I doubt it is being done by lisp,
however IF it is being accomplished through lisp, the same applies the insertion point, and size of text would need to be edited in that lisp routine
Be your Best


Michael Farrell
http://primeservicesglobal.com/

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: I need help with datestamp.dvb in Autocad 2014 PLEASE
« Reply #5 on: June 30, 2016, 10:23:45 AM »
Ermm...  I think they mean the acaddoc.lsp file is loading that DVB file, otherwise all the changes are in VBA.

notredave, check with Exxon CAD support - they may have run into this problem before or at least could look at the drawing from their end.  In the meantime have a look at the drawing DIMSCALE system variable - its somewhat traditional to use that value as a "drawing scale value" without getting into more complex code.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Jeff H

  • Needs a day job
  • Posts: 6150
Re: I need help with datestamp.dvb in Autocad 2014 PLEASE
« Reply #6 on: June 30, 2016, 02:49:46 PM »
Change your limits to match what you scaled your titleblock to.

It is using the limits of drawing to set text height .


This is how it is calculating text height
Code: [Select]
LM = "LIMMIN"
LX = "LIMMAX"
sp = ThisDrawing.GetVariable(LM)
ep = ThisDrawing.GetVariable(LX)
textHight = distance(sp, ep)


Code - Visual Basic: [Select]
  1. Function distance(sp As Variant, ep As Variant) _
  2.  As Double
  3.     Dim x As Double
  4.     Dim y As Double
  5.     Dim z As Double
  6.     x = sp(0) - ep(0)
  7.     y = sp(1) - ep(1)
  8.  
  9.     distance = Sqr(Sqr((x ^ 2) + (y ^ 2)) ^ 2)
  10.   distance = distance / 391.152144312159
  11. End Function
  12.