TheSwamp
Code Red => VB(A) => Topic started by: Matersammichman 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?
-
Lets see your code.
-
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
-
ThisDrawing.SendCommand "dim" & vbCr & "up" & vbCr & "l" '& vbCr '
-
Dim objdim As AcadDimension
objdim.Update
does .update not work?
-
No.
-
Do you need to update because you've changed the dimstyle?
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.
.....
ThisDrawing.SetVariable "LUNITS", 2
ThisDrawing.SetVariable "LUPREC", 2
ThisDrawing.SetVariable "DIMLUNIT", 2
ThisDrawing.SetVariable "DIMDEC", 2
objDimStyle.CopyFrom ThisDrawing
ThisDrawing.ActiveDimStyle = objDimStyle
-
Yes. I changed the parameters within the Dimstyle
-
and did you copy the changes to the activedimstyle as above?
-
I meant all you code
-
Thanks Cathy. Your suggestion worked.