+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Using
    not specified
    Join Date
    May 2006
    Posts
    12

    Default accessing a point which is a block

    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

  2. #2
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Motherboard:
    Intel DZ77RE-75K
    CPU:
    i7-3770K 3.50GHz
    RAM:
    32GB
    Graphics:
    Nvidia Quadro 2000
    Primary Storage:
    125GB SSD
    Secondary Storage:
    500GB SATA
    Monitor:
    ASUS 27" / ASUS 24"
    Discipline
    Civil
    Using
    Civil 3D 2013
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    3,633

    Default

    Access what, it's coordinates? We need a little more info as to what you are doing. Thanks.

  3. #3
    Junior Member
    Using
    not specified
    Join Date
    May 2006
    Posts
    12

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by rkmcswain
    Access what, it's coordinates? We need a little more info as to what you are doing. Thanks.

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts