document's namespace.

Discussion in 'AutoCAD' started by Adesu, Nov 25, 2004.

  1. Adesu

    Adesu Guest

    Look at AutoLISP Reference about " vl-doc-set"

    Sets the value of a variable in the current document's namespace.
    (vl-doc-set 'symbol value)

    This function can be used by a VLX application to set the value of a
    variable that resides in the current document's namespace.
    If executed within a document namespace, vl-doc-set is equivalent to set.

    I am not yet understand,what is the meaning "document's namespace"?

    then look at sample;

    _$ (vl-doc-set 'foobar "Rinky dinky stinky")
    "Rinky dinky stinky"

    _$ (eval foobar)
    "Rinky dinky stinky"

    I thought "(vl-doc-set 'foobar "Rinky dinky stinky") " same as with (setq
    foobar "Rinky dinky stinky") !!
     
    Adesu, Nov 25, 2004
    #1
  2. Adesu

    Alaspher Guest

    Look for a word "blackboard" in help

    Regards
     
    Alaspher, Nov 25, 2004
    #2
  3. Adesu

    John Uhden Guest

    When you create a .VLX you have an option of creating all the named functions
    and variables in its own namespace separate from each document's namespace. To
    expose your functions/variables to any document's namespace you would need to
    use such vl-doc-*, vl-bb-*, and vl-acad-*defun functions. I suggest you study
    the acad_dev.chm help file.
     
    John Uhden, Nov 25, 2004
    #3
  4. Adesu

    Adesu Guest

    Hi Alaspher and John,thanks a lot for your comment.
     
    Adesu, Nov 26, 2004
    #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.