Author Topic: Minimum and Maximum Arc length of Revclud  (Read 9384 times)

0 Members and 3 Guests are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Minimum and Maximum Arc length of Revclud
« on: July 24, 2012, 12:27:05 AM »
Hello ..

How can I get the Minimum and Maximum arc length of the command Revcloud' s value to be able to use these values ? and they are not as
needed , how can I change it outside of the command revcloud ?

Thank you so much . :-)

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Minimum and Maximum Arc length of Revclud
« Reply #1 on: July 24, 2012, 04:23:31 AM »
They're saved in registry: HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.2\ACAD-A001:409\Revision Cloud

So you'd need something like this:
Code - Auto/Visual Lisp: [Select]
  1. (defun GetRevCloudMinMax (/ path)
  2.   (setq path (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Revision Cloud"))
  3.   (cons (read (vl-registry-read path "Default Mininum Arc Length"))
  4.         (read (vl-registry-read path "Default Maximum Arc Length"))))
  5.  
  6. (defun SetRevCloudMinMax (minArc maxArc / path)
  7.   (setq path (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Revision Cloud"))
  8.   (and (vl-registry-write path "Default Mininum Arc Length" (rtos minArc 2 16))
  9.        (vl-registry-write path "Default Maximum Arc Length" (rtos maxArc 2 16))))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Coder

  • Swamp Rat
  • Posts: 827
Re: Minimum and Maximum Arc length of Revclud
« Reply #2 on: July 24, 2012, 05:10:53 AM »
Thank you so much .

it is changing the value but it does not show that in the command when calling the command : revcloud . the new value is set but the old value still prompted and not changed .

What is the main principle for getting the rest of other commands that putting their values in the registry  as you have used like this ?

Quote
(strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Revision Cloud"))
 (cons (read (vl-registry-read path "Default Mininum Arc Length"))
       (read (vl-registry-read path "Default Maximum Arc Length"))))

Thanks alot

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Minimum and Maximum Arc length of Revclud
« Reply #3 on: July 24, 2012, 07:01:25 AM »
it is changing the value but it does not show that in the command when calling the command : revcloud . the new value is set but the old value still prompted and not changed .

To my knowledge, the values displayed in the command will only be changed when AutoCAD is restarted and the registry is read during application initialisation. This applies to many (if not all) of the settings stored in the registry.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Minimum and Maximum Arc length of Revclud
« Reply #4 on: July 24, 2012, 07:13:13 AM »
Unfortunately, that's because the RefCloud program might simply use a global variable which caches the value from registry. I.e. it only reads such value once per session, and then saves it somewhere in RAM for future reference. Only when actively changing these values may it again reference the registry. I'm not sure which version of acad you're using, on my Vanilla 2012 it works fine, e.g.:
Quote
Command: REVCLOUD

Minimum arc length: 50.0000   Maximum arc length: 50.0000   Style: Normal
Specify start point or [Arc length/Object/Style] <Object>: *Cancel*

Command: (SetRevCloudMinMax 5. 5.)
T

Command: REVCLOUD

Minimum arc length: 5.0000   Maximum arc length: 5.0000   Style: Normal
Specify start point or [Arc length/Object/Style] <Object>: *Cancel*

The RevCloud command is implemented in ObjectARX (AcRevCloud.arx), thus it's near impossible to get to this thing from anywhere else.

All I can think of is to have your lisp issue the RevCloud command, then start it's Arc option, input the min & max, then issue a cancel (like in (command nil). E.g.
Code - Auto/Visual Lisp: [Select]
  1. (defun RVCArcL (m n)
  2.   (command "_.REVCLOUD" "_Arc" m n nil))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Minimum and Maximum Arc length of Revclud
« Reply #5 on: July 24, 2012, 10:14:39 AM »
Just use this instead .. IMO it's much better.

http://www.theswamp.org/index.php?topic=1319.0

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Minimum and Maximum Arc length of Revclud
« Reply #6 on: July 24, 2012, 04:54:08 PM »
Many thanks Ron   :-D
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Minimum and Maximum Arc length of Revclud
« Reply #7 on: July 24, 2012, 05:12:54 PM »
Many thanks Ron   :-D

 8-) Thank you.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Coder

  • Swamp Rat
  • Posts: 827
Re: Minimum and Maximum Arc length of Revclud
« Reply #8 on: July 25, 2012, 03:26:45 AM »
I'm not sure which version of acad you're using, on my Vanilla 2012 it works fine, e.g.:

That worked nicely on cad 2009 but with our new trial version of cad 2013 , did not change the value at all .

How can I collect more information about the registry lisp functions and specially the same one as you did ?

Many thanks  :-)

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Minimum and Maximum Arc length of Revclud
« Reply #9 on: July 25, 2012, 04:17:08 AM »
Open regedit in windows (type it into the start-menu's search bar) and then do a search for Revision Cloud (ctr+F then F3 to find next until it displays something like Maximum Arc Length). Adesk probably moved it to some new path!  ::)
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Coder

  • Swamp Rat
  • Posts: 827
Re: Minimum and Maximum Arc length of Revclud
« Reply #10 on: July 25, 2012, 04:31:50 AM »
Open regedit in windows (type it into the start-menu's search bar) and then do a search for Revision Cloud (ctr+F then F3 to find next until it displays something like Maximum Arc Length). Adesk probably moved it to some new path!  ::)

I found it as I have set to , but in the prompt of the revcould command still as it is .
I think the sub-function  you have posted earlier works better with cad 2013 .
This one .
Code: [Select]
    (defun RVCArcL (m n)
     (command "_.REVCLOUD" "_Arc" m n nil))

I am still interested about getting information about the registry .

Thanks a lot .

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Minimum and Maximum Arc length of Revclud
« Reply #11 on: July 25, 2012, 05:08:53 AM »
If these have no effect on the setting (even after restarting acad). Then it might be that it's now saved somewhere else.

Start the revcloud command, change the arc lengths manually with some "really" strange number (say something like 7493629). Then inside regedit go search for that number. If it finds such, try another random number setting of arclength and reload the regedit folder (F5) - see if it's been changed. Otherwise search again for the new number. If you cannot find it anywhere in regedit, then the description as I've posted #5 is in effect and it's impossible to get at the setting from outside the AcRevCloud.ARX itself - I think even other ARX's would find it impossible unless that ARX exposed one of its variables as a public field (which I doubt).
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Coder

  • Swamp Rat
  • Posts: 827
Re: Minimum and Maximum Arc length of Revclud
« Reply #12 on: July 26, 2012, 12:44:01 AM »
If these have no effect on the setting (even after restarting acad). Then it might be that it's now saved somewhere else.

Start the revcloud command, change the arc lengths manually with some "really" strange number (say something like 7493629). Then inside regedit go search for that number. If it finds such, try another random number setting of arclength and reload the regedit folder (F5) - see if it's been changed. Otherwise search again for the new number. If you cannot find it anywhere in regedit, then the description as I've posted #5 is in effect and it's impossible to get at the setting from outside the AcRevCloud.ARX itself - I think even other ARX's would find it impossible unless that ARX exposed one of its variables as a public field (which I doubt).

Hi .

I found it from the first time I have searched for it by the number 7493629 and it reside in the folder Variables .

When I changed the value with the use of your codes and searched for the new value , I found it in the Revision Cloud Folder and not the same
location as changing it from the command line with the command revcloud .

Is this normal ?

Many thanks Irneb

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Minimum and Maximum Arc length of Revclud
« Reply #13 on: July 26, 2012, 05:08:06 AM »
It's possibly "normal". As I said, ADesk may have changed the location where they save this setting. And what you've found seems to indicate just that. Therefore my code would only work for ACad up to release 2012. Thereafter it needs a new path as per the one you've found (sorry I don't have 2013 to check).

BTW, you mention it's inside the "Variables" folder. Is it named something without spaces? If so try typing that name into the command-line, or into a GetVar / GetEnv. Perhaps ADesk moved these to make it easier.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Coder

  • Swamp Rat
  • Posts: 827
Re: Minimum and Maximum Arc length of Revclud
« Reply #14 on: July 26, 2012, 05:31:55 AM »
I think there is no space ...