Author Topic: Update Last Dimension  (Read 2389 times)

0 Members and 1 Guest are viewing this topic.

Matersammichman

  • Guest
Update Last Dimension
« on: December 08, 2006, 03:23:25 PM »
DimUpdate doesn't exist in vba, and I can't get SendCommand to release, so how do I Update a dimension?

ska67can

  • Guest
Re: Update Last Dimension
« Reply #1 on: December 08, 2006, 03:42:56 PM »
Lets see your code.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Update Last Dimension
« Reply #2 on: December 08, 2006, 03:45:58 PM »
my guess w/o seeing your code would be to store the style name and select dims and re-assign them the style name forcing an update
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Matersammichman

  • Guest
Re: Update Last Dimension
« Reply #3 on: December 08, 2006, 03:46:17 PM »
ThisDrawing.SendCommand "dim" & vbCr & "up" & vbCr & "l" '& vbCr '

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: Update Last Dimension
« Reply #4 on: December 08, 2006, 03:56:43 PM »

Code: [Select]
Dim objdim As AcadDimension
    objdim.Update

does .update not work?

Matersammichman

  • Guest
Re: Update Last Dimension
« Reply #5 on: December 08, 2006, 04:19:41 PM »
No.

Cathy

  • Guest
Re: Update Last Dimension
« Reply #6 on: December 08, 2006, 04:55:37 PM »
Do you need to update because you've changed the dimstyle?
Quote
Dimensions created via the AutoCAD user interface are created with the active dimension style plus all document overrides. Dimensions created via ActiveX are created with the active dimension style only. To have the dimensions created via ActiveX take on the document overrides, use the CopyFrom method to copy the dimension style from the document to the active dimension style. This process will copy all existing overrides into the active dimension style.

Code: [Select]
.....
     ThisDrawing.SetVariable "LUNITS", 2
     ThisDrawing.SetVariable "LUPREC", 2
     ThisDrawing.SetVariable "DIMLUNIT", 2
     ThisDrawing.SetVariable "DIMDEC", 2

    objDimStyle.CopyFrom ThisDrawing
    ThisDrawing.ActiveDimStyle = objDimStyle

Matersammichman

  • Guest
Re: Update Last Dimension
« Reply #7 on: December 08, 2006, 05:26:05 PM »
Yes. I changed the parameters within the Dimstyle

Cathy

  • Guest
Re: Update Last Dimension
« Reply #8 on: December 09, 2006, 12:03:27 PM »
and did you copy the changes to the activedimstyle as above?

ska67can

  • Guest
Re: Update Last Dimension
« Reply #9 on: December 09, 2006, 10:54:27 PM »
I meant all you code

Matersammichman

  • Guest
Re: Update Last Dimension
« Reply #10 on: December 11, 2006, 07:43:19 AM »
Thanks Cathy. Your suggestion worked.