getting psvport name

Discussion in 'AutoCAD' started by Daron Denton, May 12, 2004.

  1. Daron Denton

    Daron Denton Guest

    in acad2004, i want to retrieve the index name(number) of the viewport using
    activex.

    i'm able to get the active layout, and the vports in that layout, and the
    properties of each vport, but i don't see the index name from each vport. i
    need to be able to compare that index name(number) to other info. what
    obvious thing am i missing here?

    thanks,
    daron
     
    Daron Denton, May 12, 2004
    #1
  2. Viewport Id numbers are assigned in the
    order of creation.
     
    Jason Piercey, May 12, 2004
    #2
  3. Daron Denton

    Daron Denton Guest

    so as i cycle through the viewports, the first psviewport is 2, next is 3,
    etc?
     
    Daron Denton, May 12, 2004
    #3
  4. Daron Denton

    Daron Denton Guest

    so that i understand, if i...
    - have 4 psviewports
    - erase a psviewport
    - get & examine the layout block object

    it will still show 4 psviewports?

    thanks Jason,
    daron
     
    Daron Denton, May 12, 2004
    #4
  5. Yes. However, I failed to mention that simply
    iterating through the layout block object looking
    for paperspace viewports and incrementing an
    index does not account for viewports that have
    been erased.
     
    Jason Piercey, May 12, 2004
    #5
  6. Daron Denton

    Daron Denton Guest

    as i see it, that is consistent with CVPORT. if you erase 3, you can only
    set 2 and 4.

    thanks for the help Jason, :eek:)
    daron
     
    Daron Denton, May 12, 2004
    #6
  7. No, it will show 3 viewports but one of the
    id numbers will not necessarily be correct
    depending on which viewport was erased.

    Create 3 viewports in a new drawing, they
    will have id numbers of 2 3 and 4. If you
    erase the second viewport your id numbers
    are still 2 and 4 not 2 and 3.
     
    Jason Piercey, May 12, 2004
    #7
  8. Daron Denton

    Daron Denton Guest

    thanks Luis, i'll keep that in mind.

    cheers,
    daron
     
    Daron Denton, May 12, 2004
    #8
  9. That is correct, consistent with CVPORT.
    Don't know of any direct activeX route to
    get what you are after, and you are welcome.
     
    Jason Piercey, May 12, 2004
    #9
  10. Daron Denton

    Daron Denton Guest

    Jason, i don't know if you are still watch this thread, but is there a way
    using activex to access the current viewport without selecting it?

    i'm not able to do what i thought iterating through the psviewports.

    thanks,
    daron
     
    Daron Denton, May 12, 2004
    #10
  11. Daron Denton

    Jeff Mishler Guest

    Not Jason, but:
    (setq thisVP (vla-get-activepviewport *doc*))

    HTH,
    Jeff
     
    Jeff Mishler, May 12, 2004
    #11
  12. Daron Denton

    Daron Denton Guest

    <sigh> oh look, trees in the forest. who knew? (setvar "sarcasm" 0)

    thank you Jeff :eek:)
    daron
     
    Daron Denton, May 12, 2004
    #12
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.