Activate DesignCenter with a block / Block Library.

Discussion in 'AutoCAD' started by CADmageren ApS, Jul 19, 2004.

  1. Hi

    I am trying to use designcenter as a block library with a specific
    drawing.dwg which contains all the necessary blocks.

    Sub DesignCenterSymbols()
    Dim sSymbolDwg As String
    sSymbolDwg = gsPath & "bmsymbols.dwg"
    If Dir(sSymbolDwg) = "" Then
    MsgBox "Symbolbibliotek blev ikke fundet: " & sSymbolDwg
    Exit Sub
    End If
    ThisDrawing.SendCommand "adcnavigate" & vbNewLine
    ThisDrawing.SendCommand sSymbolDwg & "\blocks "
    End Sub

    But I cannot get it to work properly - it should be possible to jump
    directly to the "blocks" section of the specified drawing.

    / Michael Christoffersen
     
    CADmageren ApS, Jul 19, 2004
    #1
  2. CADmageren ApS

    tp Guest

    '== Menu ==
    [_Button("Elevators", tp_elev, tp_elev)]^C^C^P(command "-vbarun"
    "MyProject.MyModule.tpAdc" "Elevators")

    '== MyModule ==
    Public Sub tpAdc() 'ByVal tpAdcDir As Integer)
    Dim tpAdcDir As String
    Dim tpAdcStr As String
    tpAdcDir = ThisDrawing.Utility.GetString(False)
    Select Case UCase(tpAdcDir)
    Case "ELEVATORS": tpAdcStr = "Equipment\Elevators"
    Case "APPLIANCES": tpAdcStr = "Appliances"
    Case "AREAGROUPTAGS": tpAdcStr = "Schedules\Area Group Tags"
    Case "AREATAGS": tpAdcStr = "Schedules\Area Tags"
    Case "SPACETAGS": tpAdcStr = "Schedules\Space Tags"
    Case "DOORWINDOWTAGS": tpAdcStr = "Schedules\Door & Window Tags"
    Case "SHOWERS": tpAdcStr = "Showers"
    Case "SANLL": tpAdcStr = "Sanitana\Lava Louças"
    Case "VALIMAGE": tpAdcStr = "Valadares\Image"
    Case "VALNEOC": tpAdcStr = "Valadares\Neoclássica"
    Case "VALOPORTO": tpAdcStr = "Valadares\Oporto"
    Case "VALTHEMA": tpAdcStr = "Valadares\Thema"
    Case "VALINLAID": tpAdcStr = "Valadares\Lavatórios encastrar"
    Case "FURNITURE": tpAdcStr = "Furniture"
    Case "ELECTRICAL": tpAdcStr = "Electrical"
    Case "ROCMOVEIS": tpAdcStr = "Roca\Móveis"
    Case "RAPSEL": tpAdcStr = "Rapsel"
    Case Else: tpAdcStr = ""
    End Select
    tpAdcStr = "Architectural Desktop\Metric\Tp\" & tpAdcStr & vbCr
    If ThisDrawing.GetVariable("ADCSTATE") = 0 Then
    ThisDrawing.SendCommand "_adcenter "
    End If
    ThisDrawing.SendCommand "_adccustomnavigate " & tpAdcStr
    End Sub
     
    tp, Jul 19, 2004
    #2
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.