Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2021 revcloud changes broken routine

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Anonymous
1552 Views, 7 Replies

AutoCAD 2021 revcloud changes broken routine

So the 2021 version is here, has a bunch of changes that sound great, however one thing they've changed that is causing me some grief is the revcloud command. Previously my company used a routine that automatically generated a revision tag and a layer for each revision to clearly mark our revclouds and such, and it also automatically set the revcloud arc length based on the LTS of the drawing. We would run this routine once at the start of our clouding for a drawing to create the layer and tag, and set the arc length for us. Then go draw all our revclouds as polylines and convert them to clouds with the revcloud command.

Along comes the changes with 2021 and firstly the revcloudarcvariance approach makes our clouds not look how we want, found that system variable and can turn it off, no major dramas. But the next issue is autolisp use of (command "REVCLOUD") seems to go to the legacy version of the command, which stores the arc length in a different place to the new version, so the routine is not setting the arc length for the standard command. So now the routine creates the tag, then you go draw the polyline, then when you use revcloud to convert it the arc length is completely wrong. Wondering if anyone knows of a system variable that the new arc length is stored in that I can set with the routine, or if I can set something else up to force the command calls of REVCLOUD into the legacy version, or even make the lisp code call the new version of the command. Any help would be greatly appreciated.

7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Below is the code of the routine we use if that helps explain the problem.

(defun C:REVCLOUD_MODEL ( / attdiatmp RV RV2 RVLYN)
	(setq attdiatmp (getvar "ATTDIA"));store current value
	(setvar "ATTDIA" 0);makes block insertion not use a dialog box
	(setq attreqtmp (getvar "ATTREQ"));store current value
	(setvar "ATTREQ" 1);makes block insertion not use default values for attributes
	(setq RV (getstring "\nEnter Revision Number:"));gets user to input a string for the revision number
	(setvar "PLINEWID" 0);sets polyline width to 0
	(setq RV2 (strcase RV));capitalises the given string
	(setq RVLYN (strcat "REV-" RV2));adds "REV-" to the string to create the layer name
	(command "_-layer" "n" RVLYN "c" "T" "255,0,0" RVLYN "LW" "0.5" RVLYN "");creates the new layer with red colour
	(command "_-layer" "s" RVLYN "");sets the current layer to the new layer
	(command "_-insert" "REVNOTE=W:/CAD/BLOCKS/SYMB-D/REVNOTE" pause (getvar "LTSCALE") "" "" RV2);inserts the rudds revnote block at a point selected by the user, sets its attribute to the revision number
	(setvar "ATTDIA" attdiatmp);restore old value
	(setvar "ATTREQ" attreqtmp);restore old value
	(command "_REVCLOUD" "A" (* 5 (getvar "LTSCALE")) (* 5 (getvar "LTSCALE")));run the revcloud command with arc length 5 times the ltscale
)
Message 3 of 8
pendean
in reply to: Anonymous

>>>>..Wondering if anyone knows of a system variable that the new arc length...<<<
AutoCAD2021 added new commands and variables for revcloud, explore them in HELP while you wait:

Commands:
REVCLOUDPROPERTIES (Command)

System Variables
REVCLOUDARCVARIANCE (System Variable)
REVCLOUDCREATEMODE (System Variable)
REVCLOUDGRIPS (System Variable)
Message 4 of 8
sdoman
in reply to: Anonymous

Tim,

 

For the new AutoCAD 2021 Revclod conmand, try setting the new and undocumented system variable “REVCLOUDAPPROXARCLEN” for arc length.  

 

Or use the legacy version of Revcloud by using:

(initcommandversion 2)

(command “revcloud” ...)

 

Above tips were posted by Lee Ambrosius on another forum. He also said the new sysvar will be documented in the help file on next update. 

Hope that helps,

Steve

 

Message 5 of 8
Anonymous
in reply to: sdoman

That undocumented system variable is exactly what I was after.

Thanks Steve.

Message 6 of 8
dhccad
in reply to: sdoman

@Anonymous and @tim.evers... is there a particular way one is supposed to change said 'undocumented' setting? When I try to put in "initcommandversion", AutoCAD does not recognize it.

Message 7 of 8
tevers9TZKA
in reply to: dhccad

Looks like the system variable is covered by the documentation now. You can change the value of any system variable by typing its name in as a command (in this case REVCLOUDAPPROXARCLEN) and you will then be prompted with the current value and to select a new value. Alternatively if you are trying to set the value within a lisp routine you would use a (setvar "REVCLOUDAPPROXARCLEN" value).

Message 8 of 8
dhccad
in reply to: tevers9TZKA

Yeah, I misread "initcommandversion" for a system variable that sets the revcloud beck to a legacy version of it. I would be interested in the legacy version [of revcloud], but not needed as park of a large lisp routine. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report