Unnamed Profile ???

Discussion in 'AutoCAD' started by BillZ, Jan 7, 2004.

  1. BillZ

    BillZ Guest

    R2004 Autolisp and Vlisp:
    In a new startup of AutoCAD, where there is no other Profile names except the default.
    If (= (getvar "cprofile") "<<Unnamed Profile>>")

    Is there a way to change to a new name without exporting to a file or importing a file.
    So I can start makeing changes without changing the unnamed profile?

    TIA

    Bill
     
    BillZ, Jan 7, 2004
    #1
  2. BillZ

    Tom Smith Guest

    Isn't the "rename" option available?
     
    Tom Smith, Jan 7, 2004
    #2
  3. Use the ActiveX method CopyProfile.


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | R2004 Autolisp and Vlisp:
    | In a new startup of AutoCAD, where there is no other Profile names except
    the default.
    | If (= (getvar "cprofile") "<<Unnamed Profile>>")
    |
    | Is there a way to change to a new name without exporting to a file or
    importing a file.
    | So I can start makeing changes without changing the unnamed profile?
    |
    | TIA
    |
    | Bill
     
    R. Robert Bell, Jan 7, 2004
    #3
  4. BillZ

    Mark Propst Guest

    ;The AutoLisp/Visual Lisp/VBA
    ; Resource Website
    ;Copyright © 1999-Perpetuity by AfraLisp
    ;Sample Profile Utilities
    ;Just a few Sample Profile Utilities.
    ;Compliments of AutoDesk :
    ;;; DESCRIPTION:
    ;;; Sample profile manipulation utilities.
    ;;; All functions return T on success and nil
    ;;; on failure. See comments above each function
    ;;; for additional details.
    ;;;
    ;;; EXAMPLES:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Get a list of profile names
    ;;
    ;(sample-profile-names)
    (defun sample-profile-names ( / profs result )
    (and
    (setq profs (sample-get-profiles-object))
    (not (vl-catch-all-error-p (vl-catch-all-apply
    'vla-GetAllProfileNames (list profs 'result))))
    result
    (setq result (vlax-safearray->list result))
    )
    result
    );defun sample-profile-names

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Rename
    ;;
    ;(sample-profile-rename "<<Unnamed Profile>>" "NewNameProfile")
    (defun sample-profile-rename ( oldName newName / profs )
    (and
    oldName
    newName
    (setq profs (sample-get-profiles-object))
    (not (vl-catch-all-error-p (vl-catch-all-apply
    'vla-RenameProfile (list profs oldName newName))))
    )
    );defun sample-profile-rename

    hth
    Mark
     
    Mark Propst, Jan 7, 2004
    #4
  5. BillZ

    BillZ Guest

    Thanks Robert,

    Worked great!

    I really can't wait until I get the hang of this vla stuff.

    Bill
     
    BillZ, Jan 7, 2004
    #5
  6. Whenever I have a question like yours, one of the first things I do is look
    at the Object Model map in the VBA/ActiveX help file. Lots of good info
    there.


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Thanks Robert,
    |
    | Worked great!
    |
    | I really can't wait until I get the hang of this vla stuff.
    |
    | Bill
     
    R. Robert Bell, Jan 7, 2004
    #6
  7. Bill didn't want to change the unnamed profile.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    "Tom Smith" <nospam> wrote in message | Isn't the "rename" option available?
    |
    | | > R2004 Autolisp and Vlisp:
    | > In a new startup of AutoCAD, where there is no other Profile names
    except
    | the default.
    | > If (= (getvar "cprofile") "<<Unnamed Profile>>")
    | >
    | > Is there a way to change to a new name without exporting to a file or
    | importing a file.
    | > So I can start makeing changes without changing the unnamed profile?
    | >
    | > TIA
    | >
    | > Bill
    |
    |
     
    R. Robert Bell, Jan 7, 2004
    #7
  8. BillZ

    BillZ Guest

    Thanks,
    Half the battle is learning how to get around all these new help files.
    (vlax-dump-object helps alot too.

    I had to make a few changes in my approach with this new menu thing. But I'm real close to what I thought would be the answer.
    Should make it a breeze to set up the new machines. :)


    Bill
     
    BillZ, Jan 7, 2004
    #8
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.