invoke-method

Discussion in 'AutoCAD' started by tcebob, Mar 30, 2005.

  1. tcebob

    tcebob Guest

    Herewith the opening bars for a viewport open/close toggle:

    (defun c:mvo( / ) ;toggle viewport on/off
    ;You can't entmod a viewport.
    (setq vp(ssname(ssget ":s" '((0 . "VIEWPORT"))) 0))
    (setq vpv(vlax-ename->vla-object vp))
    ;cond ...
    (vlax-invoke-method 'vpv.display False)
    ....

    Obviously I am in too deep. What should I be doing? Here is the Help sample:

    "(setq mycircle (vlax-invoke-method pspace 'AddCircle circCenter 3.0))"

    I could use (command "mv" . . .) but that takes the fun out of it.

    rs
     
    tcebob, Mar 30, 2005
    #1
  2. tcebob

    Jeff Mishler Guest

    Minor adjustments needed when going from VBA to Vlisp....

    (vlax-invoke-method vpv 'display :vlax-False)
     
    Jeff Mishler, Mar 30, 2005
    #2
  3. tcebob

    tcebob Guest

    Thanks, Jeff. Thought I tried that during my many variations but didn't use
    the hyphen.

    rs

    : Minor adjustments needed when going from VBA to Vlisp....
    :
    : (vlax-invoke-method vpv 'display :vlax-False)
    :
    : --
    : Jeff
    : check out www.cadvault.com
    : > Herewith the opening bars for a viewport open/close toggle:
    : >
    : > (defun c:mvo( / ) ;toggle viewport on/off
    : > ;You can't entmod a viewport.
    : > (setq vp(ssname(ssget ":s" '((0 . "VIEWPORT"))) 0))
    : > (setq vpv(vlax-ename->vla-object vp))
    : > ;cond ...
    : > (vlax-invoke-method 'vpv.display False)
    : > ...
    : >
    : > Obviously I am in too deep. What should I be doing? Here is the Help
    : > sample:
    : >
    : > "(setq mycircle (vlax-invoke-method pspace 'AddCircle circCenter 3.0))"
    : >
    : > I could use (command "mv" . . .) but that takes the fun out of it.
    : >
    : > rs
    : >
    : >
    :
    :
     
    tcebob, Mar 30, 2005
    #3
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.