Unnamed Profile ???

BillZ

Usenet Archive
Joined
Jul 9, 2003
Messages
1,001
Reaction score
0
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
 
;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
 
Thanks Robert,

Worked great!

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

Bill
 
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.
 
Bill didn't want to change the unnamed profile.

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

"Tom Smith" <nospam> wrote:
|
| | > 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 | |
 
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
 

Latest threads

Back
Top