cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lisp or Script for Stretching Hanger ATR to Global Z Elevation

Lisp or Script for Stretching Hanger ATR to Global Z Elevation

There should be a Lisp Routine or Executable Script that will allow you to select all the desired hangers in a particular zone, or globally, and dictate the “Z” elevation desired for all ATR ends to stretch to. This is much faster than stretching individually and ensures that all hangers have the correct ATR length for fabrication. If this can't be achieved when selecting all different support types at the same time, than an individual lisp/script should be created for each type.

 

For example: Set Clevis Hanger ATR, Set Roller Hanger ATR, Set J-Hanger ATR, Set V-Hanger ATR, Set Trapeze ATR, etc..

 

 

I am aware that initially, we can set up section data to ensure that hangers are stretched to the desired “Z” elevation when cut-in or populated during Fillpoint, Fill Between 2 Ends, and Design Line. However, we often move our systems up and down during clash resolution/coordination. Having such a lisp/script option available would be very cost effective for all Fabrication users.

 

I've attached a lisp routine that used to work with AutoCAD 2012/TSI CADMech hangers. I can no longer use this with AutoCAD 2017/Fabrication.

22 Comments
SKHobbs
Contributor

check at xtracad, I just updated a routine for 2017 hangers.

Gives you a starting point.

 

http://www.xtracad.com/forum/index.php/topic,13103.msg95333.html#msg95333

 

Anonymous
Not applicable

Unfortunately, I don't have access to our database to create an item called "point". Could I use the item "Control Point" in it's place and just revise the lisp routine verbiage? 

SKHobbs
Contributor

Control point should work, be aware the size of the object you insert affects the accuracy.

For instance if the "endlocation" and the insertion point of the object are not in the same place on the object,there may be a difference in where you click and where the end of the rods wind up. This is not a concern with a small object as the difference would be minimal.

SKHobbs
Contributor

UA 72 Atlanta here.

Anonymous
Not applicable

So I looked at the XTRA CAD post. I'm assuming it's two separate lisp routines correct? Or do I create one lisp routine and use the verbiage from the 1st and 3rd sections combined?

SKHobbs
Contributor

top on is a lisp routine which calls the second(for autocad 2016 or earlier) or third(autocad 2017) which are .cod scripts.

you may need to modify the COD scripts to match your particular database. Which ever COD script you are going to use needs to be saved as "hanger to point.cod" and modify the filepath in the lisp to point to where you saved it.


Anonymous
Not applicable

I tried modifying the verbiage in the COD file but it won't open. Dumb question, do I have to do this in AutoCAD environment? 

SKHobbs
Contributor

use a text editor to modify the COD file.

 

Anonymous
Not applicable

I got it to open. Had to use Notepad to open because my dumb computer couldn't figure out which program to use to edit it.

Anonymous
Not applicable

I noticed in the COD file it refers to CID 1238, 1239. Is one of these the CID number for your "point" that was created or are these CID's for the hangers within your database? All my hangers have a CID = 838. Only thing that could be a possible issue is that the "Control Point" item also has a CID = 838. In order for this to function correctly, does the "point" or "Control Point" need to have a CID # that differs from the hanger CID #?

SKHobbs
Contributor

I am filtering the "point" by filename (in your case "control point") so its CID does not matter.

The 2016 version uses all 838 hangers, but filters heavily by filename.

if you notice the different filenames filters modify different options/dims.

 

The 2017 version we reorganized our hangers with the new hanger CIDs that were made available.

this one filters by CID and you will notice each section modifies a different option/dim.

 

I would suggest doing a "save as" and stripping the COD down to one hanger type out of your library and get it working.

then start adding in other filters/hangers one at a time.

 

 

Anonymous
Not applicable

I've made the necessary adjustments and I'm now ready to run my 1st test.n After loading the lisp routine, do I then place my "Control Point" into the drawing at the desired Z elevation, then execute the script?

Anonymous
Not applicable

no

run the lisp, it will ask for a selection

select hangers then hit enter

if you have the following line of the lisp pointing to the correct location of "control point.itm" it will place "control point" wherever you click.

 

 

(command (takeoff "C:/Autodesk Fabrication/PMSHARED/Libraries/Piping Components/point.itm"))

 



it will then pass the control point and the selected hangers over to the COD script.

 

the COD script will make all the hanger rods match the elevation of "control point"

 

then pass back to the lisp which deletes "control point" from the drawing.

 

end

 

SKHobbs
Contributor

sorry, i had logged in with the wrong account.

 

Anonymous
Not applicable

When I load the lisp routine, it doesn't prompt for anything in the command line.

SKHobbs
Contributor

it will not prompt when you load.

you have to call the function from the command line.

the function call is HRTP.

type HRTP at command line after you load.

 

you have to have the path to you "control point.itm" correct.

and the path to the .COD file correct.

 

Have you looked at the tutorials from Lee Mac for lisp?

http://www.lee-mac.com/tutorials.html

 

 

 

 

 

Anonymous
Not applicable

Script Error.png

SKHobbs
Contributor

this is where you have to start changing and customizing the script to work with your database.

I cant really help you from here out since I dont have access to your ITM files.

 

Anonymous
Not applicable

Thanks for the assistance. This will be something I have to work on after hours. If I spend too much time on this, I’ll falter on deliverables. I’ll let you know how it goes. Thanks again.

Anonymous
Not applicable

Finally got it figured out. Worked with our Cad Manager and a Sheetmetal Detailer and found out the issue was the location of where the dimension for the ATR was placed within the .itm file. Since the location changed, the script had to be modified accordingly. Now it works on all the Fabrication 2017 Hanger .itm files we use. Clevis, Roller, V, J, Profiled Bearer, etc.. 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea