Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

asherjoh
602 Vistas, 12 Respuestas

REC DUCT LENTH TAGS

Is there a way to set up text for rectangular duct throat lengths and radius elbows rather than having to manually input them?

wispoxy
en respuesta a: asherjoh

Use a mix of DIMSTYLE and ENHANCED ATTRIBUTES in a block. Sometimes I layout ducts for monitoring systems because of airflow, but I do it in 2D. If you want a sample of how I do it, I can extract a small sample for you :cara_con_una_leve_sonrisa:
BeKirra
en respuesta a: asherjoh

It looks likely you are not using any ducting add-on.

Theoretically speaking, there are 2 ways to get text/size of throat:

1) Measure the line lengths on an existing duct object then place text that matching what you got;

2) Draw new duct piece then obtain the throat size from your input of the duct.

 

If I understand your question correctly, you are after the 1st option.

Here is an example:

(defun c:DuctThroat (/ ThroatLine1 Ent01 ThroatLine1_1stPt ThroatLine1_2ndPt Throat1
ThroatLine2 Ent02 ThroatLine2_1stPt ThroatLine2_2ndPt Throat2 PlaceText)

(setq ThroatLine1 (car (entsel "\nSelect 1st line: ")))
(setq Ent01 (entget ThroatLine1))
(setq ThroatLine1_1stPt (cdr (assoc 10 Ent01)))
(setq ThroatLine1_2ndPt (cdr (assoc 11 Ent01)))
(setq Throat1 (distance ThroatLine1_1stPt ThroatLine1_2ndPt))

(setq ThroatLine2 (car (entsel "\nSelect 2nd line: ")))
(setq Ent02 (entget ThroatLine1))
(setq ThroatLine2_1stPt (cdr (assoc 10 Ent02)))
(setq ThroatLine2_2ndPt (cdr (assoc 11 Ent02)))
(setq Throat2 (distance ThroatLine2_1stPt ThroatLine2_2ndPt))

(setq PlaceText (getpoint "\nInsert throat size: "))
(command "._text" PlaceText "" "" (strcat (rtos Throat1 2 0) "x" (rtos Throat2 2 0)))

(princ)
); end of defun

 

Note: This code measures lines only, not polylines.

 

HTH

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
asherjoh
en respuesta a: wispoxy

Sure, can I see an example?

asherjoh
en respuesta a: BeKirra

How do I use the code you show? I tried imputing it in the AC command line but it gave error replys.

 

BeKirra
en respuesta a: asherjoh

1) Copy my code to NotePad then save it as ThroatSize.lsp

2) Move this file to

    C:\USERS\YourName\APPDATA\ROAMING\AUTODESK\AUTOCAD MECHANICAL 2014\R19.1\ENU\ACADM

    (Note: Your AutoCAD version may be different to mine but the path should be very similar.)

3) In AutoCAD Click "Load Application..." under "Tools" tab (or type _appload in command line), after Selecting ThroatSize.lsp then click "Load" button then "Close".

4) Now you are ready to use the code - type DuctThroat (not case sensitive) in the command line then click your "Enter" key.

5) Follow the instructions showed in the command line - you should be fine.

 

HTH

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
asherjoh
en respuesta a: BeKirra

Thank You

asherjoh
en respuesta a: asherjoh

I can't get past this point.

BeKirra
en respuesta a: asherjoh

Drop the file to the "support" folder showed on your screenshot.

 

HTH

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
asherjoh
en respuesta a: BeKirra

I loaded and used it but it could be a conflict of versions. Here is what it said.

asherjoh
en respuesta a: asherjoh

When I use it on a 2d line it works but it does not seem to work on my 3d duct.

BeKirra
en respuesta a: asherjoh

Sorry, based on your original question I thought it was a 2d object.

3d drawing would be a different story.

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
asherjoh
en respuesta a: BeKirra

Sorry I was not clear. I could use something like that. I really don't know why it does not have it. It is a common requirement in ductwork construction. I do thank you for your effort. Sent from my Verizon Wireless 4G LTE smartphone