_Activity in Model or Paper...

Discussion in 'AutoCAD' started by smd, Jan 20, 2005.

  1. smd

    smd Guest

    When I want to do an activity in the active Layout (for example Inserting a block), I do check first If I'm in Model or Paper with an If... Then... Else, then I programm a line... ThisDrawing.Modelspace.Insert... or ThisDrawing.PaperSpace.Insert... Is there any method that's more effective ... sort of ThisDrawing.(ActiveSpace).Insert... Thanks for any info ... SMD
     
    smd, Jan 20, 2005
    #1
  2. smd

    fantum Guest

    You might try:

    ThisDrawing.ActiveLayout.Block.InsertBlock...

    Note that this does not account for the .MSpace property.
     
    fantum, Jan 20, 2005
    #2
  3. smd

    smd Guest

    Thank you ...
     
    smd, Jan 20, 2005
    #3
  4. Public Function ActiveSpace() As AcadBlock
    If ThisDrawing.GetVariable("cvport") = 1 then
    Set ActiveSpace = ThisDrawing.Paperspace
    else
    Set ActiveSpace = ThisDrawing.Modelspace
    End if
    End Function
     
    Tony Tanzillo, Jan 20, 2005
    #4
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.