Access what, it's coordinates? We need a little more info as to what you are doing. Thanks.
Registered forum members do not see this ad.
i have saved a point as a block and now want to access it when i run another macro.how do i do that??an example would be gr8 help




Access what, it's coordinates? We need a little more info as to what you are doing. Thanks.
Registered forum members do not see this ad.
Originally Posted by rkmcswain
ya access its coordinates.actually i want to insert a block at a point which itself is already saved as a block.
may be u can tell wahats wrong in the following code--->
there is a horizontal beam resting on 2 vertical columns.the foll. macro asks the user to scale one of the vertical columns.a selectionset exists in the drawing
Option Explicit
Public Sub structmod()
Dim objent1 As AcadEntity
Dim pickpt As Variant
Dim pickpt1 As AcadPoint
Dim pickpt2 As AcadPoint
Dim newHeight As Double
Dim objset As AcadSelectionSet
Dim objSelections As AcadSelectionSets
Dim objref As AcadBlockReference
Set objSelections = ThisDrawing.SelectionSets
Set objset = objSelections.Item("abcd")
With ThisDrawing.Utility
.GetEntity objent1, pickpt, vbCr & "Pick the column:"
newHeight = .GetInteger(vbCr & "enter scale factor in Z direction selected column:")
End With
Set pickpt1 = ThisDrawing.Blocks.Item("firstcorner")
Set pickpt2 = ThisDrawing.Blocks.Item("secondcorner")
If pickpt(0) >= pickpt2(0) Then
Set objref = ThisDrawing.ModelSpace.InsertBlock(pickpt2, "vertical2", 1#, 1#, newHeight, 0)
Else
Set objref = ThisDrawing.ModelSpace.InsertBlock(pickpt1, "vertical1", 1#, 1#, newHeight, 0)
End If
objent1.Delete
End Sub
Bookmarks