Reinforcement diameters lisp

Reinforcement diameters lisp

k005
Advisor Advisor
1,449 Views
10 Replies
Message 1 of 11

Reinforcement diameters lisp

k005
Advisor
Advisor

 

 

hello friends,

ø How can I list rebars of different diameters in the foundation reinforcement plan _?

sample:
The result I want to get:

ø8
ø10
ø12
ø14
...

It's enough to write like.

thank you so much.

0 Likes
Accepted solutions (1)
1,450 Views
10 Replies
Replies (10)
Message 2 of 11

hak_vz
Advisor
Advisor

Attach sample drawing and provide much more details how you want to have it created; table inside drawing, export to excel....

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 3 of 11

k005
Advisor
Advisor

 

The reinforcement letters in the drawing will be looked at and the different ones will make a table. or text below. talo

 

will be in dwg. We have nothing to do with Excel. no.

 

The criterion here is the diameter sign. = ø

0 Likes
Message 4 of 11

Sea-Haven
Mentor
Mentor

The dia symbol is an extended character or use %%c see this https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoC...

 

Or can do as a double input using a suitable dcl with say bar sizes as a list.

Screenshot403.png

 

 

0 Likes
Message 5 of 11

pbejse
Mentor
Mentor

Do you need a count of items per  rebar size? "6ø14" 6 as the quanity

ø12 = 25

ø14 = 12

 

or just a list of rebar size?

 

if its the former, what about this "ø8/15/8/10" <- is that 1 per ?

0 Likes
Message 6 of 11

k005
Advisor
Advisor

@pbejse 

 

 

no . not list.

 

I just want the names of the iron diameters. We have nothing to do with pieces-length and spacing.

 

just need iron diameter.

0 Likes
Message 7 of 11

k005
Advisor
Advisor

@Sea-Haven 

 

 

only iron diameter - diameters are needed.

0 Likes
Message 8 of 11

pbejse
Mentor
Mentor

@k005 wrote:

I just want the names of the iron diameters. We have nothing to do with pieces-length and spacing.


 

("ø8" "ø10" "ø12" "ø14");<--- that is the only size i'm getting

What about this ""ø8/15/8/10" ? is 15 included? 

and is this symbol included as shown on the sample drawing? 12 or 15?

 

Untitled-1.png

 

 

0 Likes
Message 9 of 11

k005
Advisor
Advisor

@pbejse 

 

 

We'll take 12.

 

* the symbol I always use: ø

 

* we will take the odd or even number on the right side of the symbol (ø).

 

Like ø8 ø10 ø12.

 

The parameter symbol is always this: ø . Our action will be accordingly.

0 Likes
Message 10 of 11

pbejse
Mentor
Mentor
Accepted solution

@k005 wrote:

* the symbol I always use: 


Keep in mind that on your sample drawing, there are three (3) characters representing the ø, 1 I already mentioned on my previous post, another is  "Æ" -- ascii code 198, and the other as "ø" -- ascii code 248. I suggest you enforce consistency in using only one type of symbol.

 

This code only targets the symbol that was used in majority on the TEXT entity

(defun c:DSL ( / dS lst string dP dSize p ) ;Diameter Sze List
;;		pBe 2021		;;; 
   (if (setq dS (ssget '((0 . "TEXT")(1 . "*ø#*"))))
    (progn
	    (repeat (setq i (sslength dS))
	      (setq string (cdr (assoc 1 (entget (ssname dS
							(setq  i (1- i)))))))
	      (setq dP (vl-string-position 248 string))
	      (setq dSize (substr string (1+ dP)))
	      (vl-some '(lambda (c)
			  (if (setq p (vl-string-position c dSize))
			    	(setq dSize (substr dSize 1 p)))) '(32 47))
	      
	     (if (not (member dSize lst))  (setq lst (cons dSize lst))
		)
	      )
      (print 
      	(setq lst (vl-sort lst '(lambda (a b)
				  (< (atoi (substr a 2))(atoi (substr b 2))))))
      	)
      )
    )
  (princ)
  )

Command: DSL

Select objects:
("ø8" "ø10" "ø12" "ø14")

 

Replace this line if you prefer the program to read everything on current tab

(setq dS (ssget '((0 . "TEXT")(1 . "*ø#*"))))

to

(setq dS (ssget "X" (list '(0 . "TEXT")'(1 . "*ø#*")(cons 410 (getvar 'Ctab)))))

 

HTH

 

 

Message 11 of 11

k005
Advisor
Advisor

@pbejse 

 

Thank you so much. Super! This is exactly what it is. 🤗

0 Likes