Jump to content

Recommended Posts

Posted

Hi All,

I have created a lisp program which defines a command called "ReloadNew".

It is to reload a profile called "New_Package".

Recently some changes have been made to the profile and I want everyone in my team to reload the profile. For that, since they already have their surrent profile set to "New_Package", I think they have to set some other profile current and then again set "New_Package" the current one.

Or am I taking a roundabout? Is there a better way of doing it with out asking them to restart their AutoCAD?

 

So far I am here.

The problem is, it shows error when I try to set the ">" current. :x

 

(
defun c:ReloadNew()
 (vl-load-com)
 (setq acadObject (vlax-get-acad-object))
 (setq prefsObject (vlax-get-property acadObject 'Preferences))
 (setq profileobj  (vlax-get-property prefsObject 'Profiles))
 (setq activeprofile (vlax-get-property profileobj 'ActiveProfile))
 (vlax-put-property profileobj '<<Unnamed Profile>>)
 (prompt "Unnamed Profile has been set current.")
 (vlax-put-property profileobj "New_Package")
 (prompt "New_Package Profile has been set current.")
)

Posted

Sorry for the post...

I got a very simple solution here

 

Hence Resolved...!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...