dimension checking

Discussion in 'AutoCAD' started by ctlo, Nov 9, 2004.

  1. ctlo

    ctlo Guest

    hi, can anyone advise me the criteria in writing vba to check the dimension values on a multi-scale drawing?
     
    ctlo, Nov 9, 2004
    #1
  2. I can help ya but need a bit more info?
    multi-scale drawing? What type of dim?
    Are they all plan to the WCS?
    hi, can anyone advise me the criteria in writing vba to check the dimension values on a multi-scale drawing?
     
    Paul Richardson, Nov 10, 2004
    #2
  3. ctlo

    junno Guest

    Thanks Paul,
    There are more than one drawing scale on a drawing. For example, scale 1:50, scale 1:100 and etc. The plotting scale for this drawing is 1:50. In addition, each dimension is associated to a dimension style name, ie s50 for 1:50, s100 for 1:100 and so forth. With each dimension style name, the factors of 'DIMLFAC' and 'DIMSCALE' are set in relation to the plotting scale. The drawing is a 2D drawing and planned to WSC
    My question is what criteria I shall have to consider in writing codes in VBA on checking the correctness of all dimensions on the drawing.
    "Paul Richardson" <> ¼¶¼g©ó¶l¥ó·s»D:419246b7$1_2@newsprd01...
    I can help ya but need a bit more info?
    multi-scale drawing? What type of dim?
    Are they all plan to the WCS?
    hi, can anyone advise me the criteria in writing vba to check the dimension values on a multi-scale drawing?
     
    junno, Nov 11, 2004
    #3
  4. Why do you use different drawing scales of you model space objects?
    If you draw everything 1:1 you can use PaperSpace to solve all your scaling problems.and with just 1 Dimstyle set to a scale of 1 with some child variations... Nice thing is WYSIWYG as far as the dimvalue...Also
    multiple view of the same object all plotted at different scales, rotations and such...

    In case you didn't want that lecture...) I would not use the dim to check
    the object. I would always find the dim's object and check that. Unles the
    Dim is the object...Also, extLinePoint1, and extLinePoint2 are doubles(2) of your dim's extension line's start and end points.

    I added some code to the acad dim sample. It has all the values you will
    need. Good Luck... Paul


    Sub Example_AddDimAligned()

    Dim dimObj As AcadDimAligned
    Dim point1(0 To 2) As Double
    Dim point2(0 To 2) As Double
    Dim location(0 To 2) As Double
    Dim SP() As Double
    Dim EP() As Double
    ' Define the dimension
    point1(0) = 5#: point1(1) = 5#: point1(2) = 0#
    point2(0) = 10#: point2(1) = 5#: point2(2) = 0#
    location(0) = 5#: location(1) = 7#: location(2) = 0#
    ' Create an aligned dimension object in model space

    Set dimObj = ThisDrawing.ModelSpace. _
    AddDimAligned(point1, point2, location)
    SP() = dimObj.ExtLine1Point
    EP() = dimObj.ExtLine2Point
    Debug.Print dimObj.Measurement
    Debug.Print dimObj.ScaleFactor
    Debug.Print "Dim Start Point: "; SP(0) & "," _
    & SP(1) & ","; SP(2)
    Debug.Print "Dim End Point: "; EP(0) & "," _
    & EP(1) & ","; EP(2)
    End Sub






    Thanks Paul,
    There are more than one drawing scale on a drawing. For example, scale 1:50, scale 1:100 and etc. The plotting scale for this drawing is 1:50. In addition, each dimension is associated to a dimension style name, ie s50 for 1:50, s100 for 1:100 and so forth. With each dimension style name, the factors of 'DIMLFAC' and 'DIMSCALE' are set in relation to the plotting scale. The drawing is a 2D drawing and planned to WSC
    My question is what criteria I shall have to consider in writing codes in VBA on checking the correctness of all dimensions on the drawing.
    "Paul Richardson" <> ¼¶¼g©ó¶l¥ó·s»D:419246b7$1_2@newsprd01...
    I can help ya but need a bit more info?
    multi-scale drawing? What type of dim?
    Are they all plan to the WCS?
    hi, can anyone advise me the criteria in writing vba to check the dimension values on a multi-scale drawing?
     
    Paul Richardson, Nov 11, 2004
    #4
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.