Author Topic: Auto update field  (Read 3473 times)

0 Members and 1 Guest are viewing this topic.

Matersammichman

  • Guest
Auto update field
« on: April 14, 2008, 01:09:46 PM »
I have a field inside an attribute.
Anyone have VBA code to auto-update it after editing without my having to constantly type in regen?
(2007)

Guest

  • Guest
Re: Auto update field
« Reply #1 on: April 14, 2008, 01:12:49 PM »
I have a field inside an attribute.
Anyone have VBA code to auto-update it after editing without my having to constantly type in regen?
(2007)

You mean something like ThisDrawing.RegenAll ??!?

Matersammichman

  • Guest
Re: Auto update field
« Reply #2 on: April 14, 2008, 01:16:34 PM »
Yes, but what Event do I use to get it to auto-run after editing the attribute/field?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Auto update field
« Reply #3 on: April 14, 2008, 01:50:32 PM »
it can be done with an object reactor to send Object.Update to the blockreference and/or attribute and/or field
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Matersammichman

  • Guest
Re: Auto update field
« Reply #4 on: April 14, 2008, 02:09:32 PM »
Uhhh...say again Houston?

deegeecees

  • Guest
Re: Auto update field
« Reply #5 on: April 14, 2008, 03:06:25 PM »
Its a start...

Code: [Select]
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
 If CommandName = "EATTEDIT"
   ThisDrawing.RegenAll
 End If
End Sub

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Auto update field
« Reply #6 on: April 14, 2008, 03:15:51 PM »
you could try this:

Code: [Select]
Private Sub AcadDocument_ObjectModified(ByVal acadObject As Object)
    acadObject.UpDate
End Sub
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Matersammichman

  • Guest
Re: Auto update field
« Reply #7 on: April 16, 2008, 09:57:54 AM »
I've tried numerous modifications.
None work without getting caught in an endless loop.

Guest

  • Guest
Re: Auto update field
« Reply #8 on: April 16, 2008, 10:00:05 AM »
I've tried numerous modifications.
None work without getting caught in an endless loop.
Can you post what you've got so far?

Matersammichman

  • Guest
Re: Auto update field
« Reply #9 on: April 16, 2008, 10:22:21 AM »
Unfortunately, no.
When it doesn't work, I blow it away.
Suffice it to say they were the originals offered above, and derivations thereof.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Auto update field
« Reply #10 on: April 16, 2008, 10:38:36 AM »
Keep in mind that you cannot modify an object inside of the ObjectModified event, to do so would cause an infinite loop
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie