Results 1 to 3 of 3

Thread: Please point out my mistake.

  1. #1
    Leonard Johnson Guest

    Please point out my mistake.

    Public Sub SCBKL2()
    I'm trying to scale mulptile block about their insertion point. Could
    someone please point out my mistake?

    Dim objDrawing As AcadBlockReference
    Dim varEntityPickedPoint As Variant
    Dim InsertionPoint As Variant
    Dim dblScaleFactor As Double
    Dim objScale As AcadBlockReference
    Dim objSelSet As AcadSelectionSet

    Set objSelSet = ThisDrawing.PickfirstSelectionSet
    objSelSet.SelectOnScreen

    On Error Resume Next

    InsertionPoint = objDrawing.InsertionPoint

    dblScaleFactor = ThisDrawing.Utility.GetReal("Enter the scale factor: ")

    'Scale the object

    For Each objDrawing In objSelSet
    Set objScale = objDrawing.ScaleEntity
    objScale InsertionPoint, dblScaleFactor

    Next objDrawing
    objSelSet.Delete

    Exit_Here:
    Exit Sub

    End Sub

  2. #2
    Jorge Jimenez Guest
    InsertionPoint = objDrawing.InsertionPoint
    objDrawing hasn't been set yet !! Delete this line
    This should work

    For Each objDrawing In objSelSet
    InsertionPoint = objDrawing.InsertionPoint
    objDrawing.ScaleEntity InsertionPoint, dblScaleFactor
    Next objDrawing

    If it's only blockreferences you want to scale, you should filter
    your selection set, so no other type of entity is picked up.

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

    "Leonard Johnson" <leonard@phalighting.com> wrote in message
    news:41b75a83$1_2@newsprd01...
    Public Sub SCBKL2()
    I'm trying to scale mulptile block about their insertion point. Could
    someone please point out my mistake?

    Dim objDrawing As AcadBlockReference
    Dim varEntityPickedPoint As Variant
    Dim InsertionPoint As Variant
    Dim dblScaleFactor As Double
    Dim objScale As AcadBlockReference
    Dim objSelSet As AcadSelectionSet

    Set objSelSet = ThisDrawing.PickfirstSelectionSet
    objSelSet.SelectOnScreen

    On Error Resume Next

    InsertionPoint = objDrawing.InsertionPoint

    dblScaleFactor = ThisDrawing.Utility.GetReal("Enter the scale factor:
    ")

    'Scale the object

    For Each objDrawing In objSelSet
    Set objScale = objDrawing.ScaleEntity
    objScale InsertionPoint, dblScaleFactor

    Next objDrawing
    objSelSet.Delete

    Exit_Here:
    Exit Sub

    End Sub

  3. #3
    Leonard Johnson Guest
    Thanks

    "Jorge Jimenez" <unknown@nospam.com> wrote in message
    news:41b76141_2@newsprd01...
    InsertionPoint = objDrawing.InsertionPoint
    objDrawing hasn't been set yet !! Delete this line

    This should work

    For Each objDrawing In objSelSet
    InsertionPoint = objDrawing.InsertionPoint
    objDrawing.ScaleEntity InsertionPoint, dblScaleFactor
    Next objDrawing

    If it's only blockreferences you want to scale, you should filter
    your selection set, so no other type of entity is picked up.

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

    "Leonard Johnson" <leonard@phalighting.com> wrote in message
    news:41b75a83$1_2@newsprd01...
    Public Sub SCBKL2()
    I'm trying to scale mulptile block about their insertion point. Could
    someone please point out my mistake?

    Dim objDrawing As AcadBlockReference
    Dim varEntityPickedPoint As Variant
    Dim InsertionPoint As Variant
    Dim dblScaleFactor As Double
    Dim objScale As AcadBlockReference
    Dim objSelSet As AcadSelectionSet

    Set objSelSet = ThisDrawing.PickfirstSelectionSet
    objSelSet.SelectOnScreen

    On Error Resume Next

    InsertionPoint = objDrawing.InsertionPoint

    dblScaleFactor = ThisDrawing.Utility.GetReal("Enter the scale factor:
    ")

    'Scale the object

    For Each objDrawing In objSelSet
    Set objScale = objDrawing.ScaleEntity
    objScale InsertionPoint, dblScaleFactor

    Next objDrawing
    objSelSet.Delete

    Exit_Here:
    Exit Sub

    End Sub


Similar Threads

  1. COPY mistake
    By F.D. in forum Drafting
    Replies: 3
    Last Post: 12-01-2005, 05:10 PM
  2. Replies: 2
    Last Post: 10-14-2005, 05:10 PM
  3. SPECIFY FIRST POINT
    By D351GN in forum AutoCAD
    Replies: 7
    Last Post: 03-24-2005, 06:17 PM
  4. Replies: 1
    Last Post: 01-26-2005, 10:42 AM
  5. How to place a point above a certain point
    By mike in forum MicroStation
    Replies: 5
    Last Post: 01-18-2005, 08:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum