lisp for creating drawings layout list table stopped working

lisp for creating drawings layout list table stopped working

monzoor.hossain
Contributor Contributor
407 Views
3 Replies
Message 1 of 4

lisp for creating drawings layout list table stopped working

monzoor.hossain
Contributor
Contributor

Hi i have this lisp for creating drawings layout list table, it was working but all of a sudden it gives error mgs: "error: ADS request error",

 

if one out their can help me to solve this issue, will be highly appreciated,

 

My template & related script attached

 

 

 

[ The subject line of this post has been edited for clarity by @pendean Original: Cad Administrator]

 

Regards,

Monzoor

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

paullimapa
Mentor
Mentor
Accepted solution

There are two sections I changed to make the routine run successfully:

Section 1 - Commented out lines causing errors & replaced with new code:

 

 

  ;; Get attributes/vals from title blocks
; add this to initialize i value
  (setq i 0)
;
  (foreach lay (cdr (layoutlistordered)) ; this skips first layout tab
    (if (setq ss (ssget "_X" (list (cons 0 "INSERT") (cons 2 "CBC-TITLE_A3LAYOUT") (cons 410 lay))))
	  ;; sheetInfo = (layoutName description issue)
	  (setq e (ssname ss 0)
            sheetInfo
			  (cons
			    (list
				  lay
				  (strcat
					(getpropertyvalue e "SHEET-DETAILS")
					" ("
; add space
          " "
;
;					(getpropertyvalue e "1") ; this does not exist
;					(getpropertyvalue e "SHEET-NUMBER-OF-X1") ; for some reason this is always set to 1
; add this to get page # 
          (itoa (setq i (1+ i)))
;
					" OF "
;					(getpropertyvalue e "2") ; this does not exist
;					(getpropertyvalue e "SHEET-NUMBER-OF-X2") ; for some reason this is always set to 1
; add this to get total pages not including first layout
          (itoa (1- (length (cdr (layoutlistordered))))) 
;
                    ")"
				  );strcat
				  (getpropertyvalue e "ISSUE")
				);list
				sheetInfo
			  );cons
	  );setq
	);if
	(setq ss nil)
  );foreach

 

 

Section 2 - Commented out the following 3 lines of code:

 

 

;  (vla-SetTextStyle t_Style2 acTitleRow "ARIAL")
;  (vla-SetTextStyle t_Style2 acHeaderRow "ARIAL")
;  (vla-SetTextStyle t_Style2 acDataRow "ARIAL")

 

 

See attached revised files

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 4

monzoor.hossain
Contributor
Contributor

Hi Paul,

Thank you so much for your kind help, this is why i always reach out to this forum whenever i am in need of help,

i have gone through your correction & this will help me to correct my other scripts for which i forever grateful to you.

Thanks again,

Monzoor, from Sydney Australia

0 Likes
Message 4 of 4

paullimapa
Mentor
Mentor

Glad to have helped…cheers from Los Angeles, California USA


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos