Acquire assigned plot style table name through vlisp

Discussion in 'AutoCAD' started by Jason, Jun 24, 2004.

  1. Jason

    Jason Guest

    Is it possible to acquire the plot style table name that is currently
    assigned to the active model or layout tab through vlisp? When no objects
    are selected, it can be seen (and for that matter changed) from the
    Properties palette, Plot style group.

    Thanks, Jason
     
    Jason, Jun 24, 2004
    #1
  2. The property is stored under the "obvious" name StyleSheet:

    Command: (vla-Get-StyleSheet (vla-Item (vla-Get-Layouts
    (vla-Get-ActiveDocument (vlax-Get-Acad-Object))) "Model"))
    "Grayscale.ctb"


    --
    R. Robert Bell


    Is it possible to acquire the plot style table name that is currently
    assigned to the active model or layout tab through vlisp? When no objects
    are selected, it can be seen (and for that matter changed) from the
    Properties palette, Plot style group.

    Thanks, Jason
     
    R. Robert Bell, Jun 24, 2004
    #2
  3. Jason -

    This is the StyleSheet property of the current Layout object - which, in turn, is part of the Modelspace or Paperspace collection.

    Note that this returns a string - it doesn't check that the ctb actually exists.

    Peter
     
    petersciganek, Jun 24, 2004
    #3
  4. Peter,

    Layouts have their own collection. See the object model. Note that the
    ModelSpace and PaperSpace collections are separate.

    --
    R. Robert Bell


    Jason -

    This is the StyleSheet property of the current Layout object - which, in
    turn, is part of the Modelspace or Paperspace collection.

    Note that this returns a string - it doesn't check that the ctb actually
    exists.

    Peter
     
    R. Robert Bell, Jun 24, 2004
    #4
  5. Jason

    Jason Guest

    That's perfect! Thanks Robert.
     
    Jason, Jun 24, 2004
    #5
  6. Thanks Robert,

    I should have stated that the layout is a property of the Modelspace or Paperspace collection rather than part of it...

    I have been retrieving the current Layout object from the Paperspace or Modelspace object's property (depending on the docs ActiveSpace property) - I seem to recall running into problems if I accessed it directly through the layouts collection or the ActiveLayout property of the document.

    Peter
     
    petersciganek, Jun 24, 2004
    #6
  7. Really? I have had any trouble with the Layouts collection. <hesitant> Maybe
    it was a learning curve issue? </hesitant>

    --
    R. Robert Bell


    Thanks Robert,

    I should have stated that the layout is a property of the Modelspace or
    Paperspace collection rather than part of it...

    I have been retrieving the current Layout object from the Paperspace or
    Modelspace object's property (depending on the docs ActiveSpace property) -
    I seem to recall running into problems if I accessed it directly through the
    layouts collection or the ActiveLayout property of the document.

    Peter
     
    R. Robert Bell, Jun 24, 2004
    #7
  8. Everything is a learning curve issue for me...
     
    petersciganek, Jun 25, 2004
    #8
  9. Just thought I should mention that you might be going about it the hard way.
    ;^)
     
    R. Robert Bell, Jun 25, 2004
    #9
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.