Jump to content

Setting Command Properties in Startup.lsp


JWhelp

Recommended Posts

I’m sure this is a basic one - I would like customise my startup settings in CAD. How do I reference a parameter of a command with lisp, e.g. revcloud’s Arc length, and pass it a value?

Link to comment
Share on other sites

Welcome to CADTutor!

 

The revcloud's "Default Minimum Arc Length" and "Default Maximum Arc Length" are stored in the registry under the "Revision Cloud" Key. However, only after the user changes from the default 0.5 values will these registry keys be added.

 

Hope this helps!

Edited by BlackBox
I always find the typo AFTER I hit the button!
Link to comment
Share on other sites

Cheers!

 

Ok - So are you saying i can't change them from their default value, initially, because they don't exist? i could access the register and replace the values but only after manually invoking the command: "revcloud", "a", then "values" ?

 

:unsure:

Link to comment
Share on other sites

This will write to the correct keys:

 

(defun RevMinMax ( _min _max / path )
 (setq path (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Revision Cloud"))
 (vl-registry-write path "Default Maximum Arc Length" (rtos _min 2))
 (vl-registry-write path "Default Mininum Arc Length" (rtos _max 2))
 (princ)
)

 

E.g.

 

(RevMinMax 3.0 4.0)

 

I can't believe that whoever programmed this area of AutoCAD included a typo in the RegKey...

Link to comment
Share on other sites

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...