Results 1 to 4 of 4

Thread: Insert SSM block/viewport on specific layer.

  1. #1
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default Insert SSM block/viewport on specific layer.

    Hiya gang,

    I'be been using to Lee Mac's Layer Director to great effect to ensure that Viewports are always drawn on our "_VPORT" layer.

    However, I'd like to do the same thong when placing a view from the SSM and when placing a callout form the SSM.

    At the moment, the vport and callouts always go on whatever layer is current.

    I know this involves reactors but I'm out of my depth there.

    I can't seem to modify Layer Director in this manner as only blocks with specific names should go on our _CALLOUTS layer, not all inserted blocks.

    Any help would be as always, much appreciated.

    -JP

  2. #2
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default Re: Insert SSM block/viewport on specific layer.

    OK, made some headway but still need some help.

    I was in the dark about what commands were issued when placing a view or a callout. I now have Lee Mac's Layer Director working almost 100%

    Placed SSM callouts are forced to the correct layer using this code (command in RED):

    Code:
    ("*CALLOUT*"             "L-ANNO-SYMB"      "Annotations - Symbols"                             3        "Continuous"           -3                 1                 nil         )
    When placing a view from the SSM, the viewport is forced to the correct layer using this code:

    Code:
    ("*PLACEVIEW*"             "L-PS-VPORT"      "Paper Space - Viewport, NO PLOT"                             5        "Continuous"           -3                 0                 nil         )
    However, the title tag that is inserted as part of placing a view on a sheet still winds up on the current layer.

    Screen Shot 2020-02-04 at 3.42.23 PM.png

    Anyone know what command inserts that block?

  3. #3
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default Re: Insert SSM block/viewport on specific layer.

    Hiya gang,

    Made a bit more headway...

    The following code added to Lee Mac's Layer Director routine will place the view label on the specified layer when placing the view label manually.

    However, it still does not work when placing a view on a sheet, the view label still winds up on the current layer.

    Code:
    ("*VIEWLABEL*"           "L-ANNO-SYMB"    "Annotations - Symbols"                                       3        "Continuous"           -3                 1                 nil         )
    I'll keep plugging away, but any help is appreciated.

    -JP

  4. #4
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default Re: Insert SSM block/viewport on specific layer.

    OK, did some more sleuthing using Lee Mac's code Modified thusly:



    Code:
    ; Layer Director by Lee McDonnell (MODIFIED)
    
    (vl-load-com)
    
    (if (not cmdReactor)
       (setq cmdReactor
            (vlr-command-reactor
            nil
            '((:vlr-commandWillstart . startCommand)
              (:vlr-commandEnded . endcommand)
              (:vlr-commandCancelled . cancelCommand)
             )
            ) ; end command reactor
       ) ; end setq
    ) ; end if
    
    (defun startCommand (calling-reactor startcommandInfo / thecommandstart)
       (setq oldlay (getvar "clayer"))
       (setq thecommandstart (car startcommandInfo))
       (if    (= thecommandstart "PLACEVIEW")
       (setvar "clayer" "L-PS-VPORT")
       ) ;_  end if
       (princ)
    ) ; end startcommand
    
    (defun endCommand (calling-reactor endcommandInfo / thecommandend)
       (setq thecommandend (car endcommandInfo))
       (if    (= thecommandend "PLACEVIEW")
       (alert "PLACEVIEW DONE!")
       ) ;_  end if
       (princ)
    ) ; end endCommand
    
    (defun cancelCommand (calling-reactor cancelcommandInfo / thecommandcancel)
       (setq thecommandcancel (car cancelcommandInfo))
       (if    (= thecommandcancel "INSERT")
       (setvar "clayer" oldlay)
       ) ;_  end if
       (princ)
    ) ; end cancelCommand
    This creates a dialog box when the PLACEVIEW command completes. As you can see, the PLACEVIEW command completes prior to the view label being placed.

    PV1.png

    After clicking 'OK' the view label is placed.

    PV2.png

    So I guess what I need to know is what command is issued after PLACEVIEW that inserts the viewlabel, and if that command is VIEWLABLE, why is the reactor not grabbing it like it does when placing the callout view directly form the SSM?



    Thanks as always for your help folks

Similar Threads

  1. 2015: SSM-insert of callout block causes crash
    By jeff.77718 in forum AutoCAD Sheet Set Manager
    Replies: 6
    Last Post: 2017-08-24, 09:23 PM
  2. Replies: 1
    Last Post: 2017-01-15, 12:22 AM
  3. Dim Text on Specific Layer instead of having Specific Color
    By Masroor Javid in forum ACA Wish List
    Replies: 0
    Last Post: 2009-02-23, 09:34 AM
  4. Force new VIEWPORT to specific layer
    By JeremiahM in forum AutoCAD Customization
    Replies: 7
    Last Post: 2004-10-18, 09:55 PM
  5. layer to layer ..viewport to viewport
    By jfields.61630 in forum AutoCAD General
    Replies: 6
    Last Post: 2004-10-08, 06:57 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
  •