| Author |
Message |
Leonard Johnson
Guest
|
Posted:
Thu Dec 09, 2004 12:48 am Post subject:
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
|
|
| Back to top |
|
 |
Jorge Jimenez
Guest
|
Posted:
Thu Dec 09, 2004 1:17 am Post subject:
Re: Please point out my mistake. |
|
|
| Quote: | 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...
| Quote: | 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
|
|
|
| Back to top |
|
 |
Leonard Johnson
Guest
|
Posted:
Thu Dec 09, 2004 1:32 am Post subject:
Re: Please point out my mistake. |
|
|
Thanks
"Jorge Jimenez" <unknown@nospam.com> wrote in message
news:41b76141_2@newsprd01...
| Quote: | 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
|
|
|
| Back to top |
|
 |
|
|
|
|