Problems with Revcloud Customizing (Arclength and command options)

Problems with Revcloud Customizing (Arclength and command options)

cristian_leon_gonzalez
Enthusiast Enthusiast
1,533 Views
3 Replies
Message 1 of 4

Problems with Revcloud Customizing (Arclength and command options)

cristian_leon_gonzalez
Enthusiast
Enthusiast

Hello Everyone

 

 

I'm trying to customize the AutoCAD revcloud program with the hability to work with a personal app that calls to a preset layer, get the current scale and so on... it works but not as I wish.

 

(I have a revcloud app that works fine, but it's old and doesn't get the lastest upgrades of the autocad app)

 

First, the command line promp... it doesn't appear, no matter the value of the CLIPROMPTUPDATE value (see pictures below)

in the other hand, the revcloud registry value that defines the arc lenght starts with an *, so it can't be read from the VL-REGISTRY-READ function

 

I Need to show the command prompt while running the app and get the last arc value of the revcloud app

 

 

what am i missing? can you help me?

 

 

The customized app for evaluation 

 

 

(DEFUN c:revcloud-cl (/ esca ARCL ARCLENGTH)
  (PRINC "\n  Revcloud-cl")

  (uerr-def
    (LIST "undo" "clayer" "lunits" "CLIPROMPTUPDATE" "CLIPROMPTLINES"
	 )
  ) ;_ Personal App that stores the variables and original values to be restored at the end. You can eliminate this

  (SETVAR "lunits" 2)

;;; You can eliminate the following (IF (= nil (SETQ ARCL (VL-REGISTRY-READ (regpath-raiz) ;_ Personal Windows Registry Store Location "Arc Length Cloud" ) ) ) (SETQ ARCL (VL-REGISTRY-WRITE (regpath-raiz) ;_ Personal Windows Registry Store Location "Arc Length Cloud" "5" ) ) ) ;;; Until here

(SETQ esca (escala-sym nil)) ;_ Personal App that keep the working Scale (similar to Annotation Scale from AutoCAD). For evaluation you can change to 1 (LAYER "REVC") ;_ Personal app that change the Current Layer to the revision one (SETQ ARCLENGTH (* ESCA (DISTOF ARCL 2))) ;_Defines the ARCLENGTH in function of the Working Scale and the defined arc length (ARCL) at 1:1 scale (the final one). For evaluation you can change to .25 or 6 (imperial or metric) (SETVAR "REVCLOUDGRIPS" 1) ;_ Force this variable (SETVAR "REVCLOUDCREATEMODE" 2) ;_ Force to be Polygon Cloud (SETVAR "CLIPROMPTLINES" 5) (SETVAR "CLIPROMPTUPDATE" 1) ;_ <<< DOESN'T SEEMS TO WORK (INITCOMMANDVERSION 2) ;_ Force the app to Run the last version of RevCloud command
(COMMAND "REVCLOUD" "A" (- ARCLENGTH (* esca 0.25)) (+ ARCLENGTH (* esca 0.25)) ) ;_ Run the command and defines the Arclength (min and max) ;;; *** here the command makes the cloud (work) but i can't see the options in the command line!!! *** (WHILE (= (LOGAND 1 (GETVAR "cmdactive")) 1) (COMMAND pause) ) ;_ Pauses the program until the running command finish (SETQ maxarc (VL-REGISTRY-READ (STRCAT (VL-REGISTRY-PRODUCTKEY) "\\Variables") "*REVCLOUDMAXLENGTH" ) ) ;_ Try to Read the last value of the max arc lenght from the registry - DOESN'T WORK!!! (VL-REGISTRY-WRITE (regpath-raiz) ;_ Personal Windows Registry Store Location "Arc Length Cloud" (RTOS (- (/ maxarc esca) 0.25) 2 2) ;_ It returns the value of the arclength in function of the scale (opposite operation) ) ;_ Try to write the arc value in my personal location for future references (uerr-rest) ;_ Personal App that Restore the System Variables (PRINC) ;_Clean End )

 

 

Running the App with Clipromptupdate = 1Running the App with Clipromptupdate = 1Running the App with Clipromptupdate = 0, no changeRunning the App with Clipromptupdate = 0, no change

 

 

The original Revcloud Command showing the options  (As I want it to be shown)The original Revcloud Command showing the options (As I want it to be shown)

 

 

Windows Registry with the Arclength value (starts with *)Windows Registry with the Arclength value (starts with *)

 

 

0 Likes
Accepted solutions (1)
1,534 Views
3 Replies
Replies (3)
Message 2 of 4

Ranjit_Singh
Advisor
Advisor
Accepted solution

See this post here. Maybe it helps.

Message 3 of 4

cristian_leon_gonzalez
Enthusiast
Enthusiast

Works great!!! thanks a lot...

 

 

First, the command prompt doesn't show because the CMDECHO variable was not set Man Embarassed

 

Second... the system variables related  were unknown for me, i swear i look for them

 

proveprove

 

i post  the last version, may be useful if you edit it 

 

(DEFUN c:revcloud-cl (/ esca ARCL ARCLENGTH maxarc minarc arcvariation)
  (PRINC "\n  Revcloud-cl")

  (uerr-def
    (LIST "undo" "clayer" "lunits" "CLIPROMPTUPDATE" "CLIPROMPTLINES"
	  "CMDECHO"
	 )
  ) ;_ Personal App that stores the variables and original values to be restored at the end

  (setq arcvariation 1.2) ;_ Stores the value that add and subtract to the arc stored value (the arc lenght variation)
  (SETVAR "lunits" 2)
  (IF (= nil
	 (SETQ ARCL (VL-REGISTRY-READ
		      (regpath-raiz) ;_ Personal Windows Registry Store Location
		      "Arc Length Cloud"
		    )
	 )
      )
    (SETQ ARCL (VL-REGISTRY-WRITE
		 (regpath-raiz) ;_ Personal Windows Registry Store Location
		 "Arc Length Cloud"
		 "5"
	       )
    )
  )

  (SETQ esca (escala-sym nil)) ;_ Personal App that keep the working Scale (similar to Annotation Scale from AutoCAD).  For evaluation you can change to 1
  (LAYER "REVC") ;_ Personal app that change the Current Layer to the revision one
  (SETQ ARCLENGTH (* ESCA (DISTOF ARCL 2))) ;_Defines the ARCLENGTH in function of the Working Scale and the defined arc length (ARCL) at 1:1 scale (the final one).  For evaluation you can change to .25 or 6 (imperial or metric)

  (SETVAR "REVCLOUDGRIPS" 1) ;_ Force this variable
  (SETVAR "REVCLOUDCREATEMODE" 2) ;_ Force to be Polygon Cloud

  (SETVAR '*REVCLOUDMINARCLENGTH (- ARCLENGTH (* esca arcvariation)))
  (SETVAR '*REVCLOUDMAXARCLENGTH (+ ARCLENGTH (* esca arcvariation)))

  (SETVAR "CLIPROMPTLINES" 5)

  (SETVAR "CLIPROMPTUPDATE" 1)
  (SETVAR "CMDECHO" 1)

  (INITCOMMANDVERSION 2) ;_ Force the app to Run the las version of RevCloud command
  (COMMAND "REVCLOUD")


;;;  here the command makes the cloud (work) 

  (WHILE (= (LOGAND 1 (GETVAR "cmdactive")) 1)
    (COMMAND pause)
  ) ;_ Pauses the program until the running command finish

  (SETQ	maxarc
	 (GETVAR '*REVCLOUDMAXARCLENGTH)
  ) ;_ Try to Read the last value of the max arc lenght from the variable
  (SETQ	minarc
	 (GETVAR '*REVCLOUDMinARCLENGTH)
  ) ;_ Read the last value of the min arc lenght from the variable


  (VL-REGISTRY-WRITE
    (regpath-raiz) ;_ Personal Windows Registry Store Location
    "Arc Length Cloud"
    (RTOS (/ (/ (+ minarc maxarc) 2.0) esca) 2 2) ;_ It returns the value of the arclength in function of the scale (opposite operation)
  ) ;_ write to registry

  (uerr-rest) ;_ Personal App that Restore the System Variables

  (PRINC) ;_Clean End
)

 

 

0 Likes
Message 4 of 4

One else thing to consider

 

 

The Revcloud is affected by the Dimscale System Variable so, I had to make a correction to the factors considering the dimscale value (dividing before revclouding and multiplying at the end)

0 Likes