Area Lisp not working

Area Lisp not working

sam
Advocate Advocate
921 Views
3 Replies
Message 1 of 4

Area Lisp not working

sam
Advocate
Advocate

Hi All, 

I have this lisp file which used to work well. 

It would take boundary area and divide it by 180 (which is capacity of single hydraulic ram) and will output text values of total area and total hydraulic rams required. 

 

I have restarted using it for few years and for reason it just is not working. 

Any ideas why it is not working right and if it could be fixed?

 

Best regards, 

sam

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

dbhunia
Advisor
Advisor
Accepted solution

Text height can not be "0".......

 

(DEFUN C:RAMs (/ TA TH)
  (COMMAND "AREA" "OB" PAUSE)
  (SETQ	TA	  (/ (GETVAR "AREA") 1000000)
	Tpressure 6
	;; ram loads in Kn/m square
	Tload	  (* TA Tpressure)
	CRam	  180
;;; ram capacity 180kN
	NofRam	  (/ Tload CRam)
	ramarea	  (/ TA NofRam)
  )
  (COMMAND "TEXT"
	   "J"
	   "M"
	   (GETPOINT)
	   ""
	   0
	   (STRCAT "AREA=" (RTOS TA))
  )
  (COMMAND "TEXT"
	   "J"
	   "M"
	   (GETPOINT)
	   ""
	   0
	   (STRCAT "Total Load=" (rtos Tload))
  )
  (COMMAND "TEXT"
	   "J"
	   "M"
	   (GETPOINT)
	   ""
	   0
	   (STRCAT "Total No of Rams=" (rtos NofRam))
  )
  (COMMAND "TEXT"
	   "J"
	   "M"
	   (GETPOINT)
	   ""
	   0
	   (STRCAT "Loaded Area per Ram=" (rtos Ramarea))
  )
)

Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 3 of 4

sam
Advocate
Advocate

Thanks @dbhunia

Would it possible for you to annotate the code? I just want to try to add bit of more functionality. 

best regards, 

sam

0 Likes
Message 4 of 4

Sea-Haven
Mentor
Mentor

Can you explain more what the object or objects are that you are using to get the area. For example a pline has an area.

 

You can use bpoly for objects making an internal area.

0 Likes