DIMSCALE

Discussion in 'AutoCAD' started by elefebvre, Jun 22, 2004.

  1. elefebvre

    elefebvre Guest

    hi,

    i know there are a lot of posted messages already on this, but i still haven't found a solution for my problem.

    For Each dimST In ThisDrawing.DimStyles
    If dimST.Name = "BBS_LABELS" Then
    ThisDrawing.ActiveDimStyle = dimST
    Next
    ThisDrawing.SetVariable "DIMSCALE", sc

    when i do this, it creates an override with the new sc factor ,but the original stays the same. I want the original to change with the sc factor. How do i do that?

    thanks in advance,

    Emmanuel

    ' draw temporary dimline
    On Error GoTo ErrorHandler
    p1 = ThisDrawing.Utility.GetPoint(, vbCr & "Specify first extension line origin: ")
    p2 = ThisDrawing.Utility.GetPoint(p1, vbCr & "Specify second extension line origin: ")
    Data(3) = p1
    On Error Resume Next
    Set dimobj = ThisDrawing.ModelSpace.AddDimAligned(p1, p2, p2)
     
    elefebvre, Jun 22, 2004
    #1
  2. Use the CopyFrom method

    --
    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


    haven't found a solution for my problem.
    original stays the same. I want the original to change with the sc factor.
    How do i do that?
     
    Jorge Jimenez, Jun 22, 2004
    #2
  3. elefebvre

    Jackrabbit Guest

    Add this line after setting the scale variable:

    dimST.CopyFrom ThisDrawing
     
    Jackrabbit, Jun 22, 2004
    #3
  4. elefebvre

    elefebvre Guest

    hi,

    The dimstyle still won't change. It does create an override, but when i create a new dimension, it uses the 'mother' version and not the override. Either way, i don't want to use overrides, i simply want the 'mother' version to change. How can i do that???

    here's the code...

    For Each dimST In ThisDrawing.DimStyles
    If dimST.Name = "BBS_LABELS" Then ThisDrawing.ActiveDimStyle = dimST
    Next
    ThisDrawing.SetVariable "dimscale", sc
    dimST.CopyFrom ThisDrawing

    .....

    Set dimobj = ThisDrawing.ModelSpace.AddDimAligned(p1, p2, p2)
    dimobj.Layer = "BBS_BARLBL_DIM1"
    dimobj.SetXData DataType, Data
    dimobj.StyleName = "BBS_LABELS"
     
    elefebvre, Jul 1, 2004
    #4
  5. CopyFrom. It is all documented in the VBA Guide.

    --
    R. Robert Bell


    hi,

    The dimstyle still won't change. It does create an override, but when i
    create a new dimension, it uses the 'mother' version and not the override.
    Either way, i don't want to use overrides, i simply want the 'mother'
    version to change. How can i do that???

    here's the code...

    For Each dimST In ThisDrawing.DimStyles
    If dimST.Name = "BBS_LABELS" Then
    ThisDrawing.ActiveDimStyle = dimST
    Next
    ThisDrawing.SetVariable "dimscale", sc
    dimST.CopyFrom ThisDrawing

    .....

    Set dimobj = ThisDrawing.ModelSpace.AddDimAligned(p1, p2, p2)
    dimobj.Layer = "BBS_BARLBL_DIM1"
    dimobj.SetXData DataType, Data
    dimobj.StyleName = "BBS_LABELS"
     
    R. Robert Bell, Jul 7, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.