Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wiremesh & Insulation Custom Linetypes

7 REPLIES 7
Reply
Message 1 of 8
sovby
2684 Views, 7 Replies

Wiremesh & Insulation Custom Linetypes

I would like to create a wiremesh linetype as well as an insulation linetype that i can make 3-1/2" wide for a 2x4 stud wall, 5-1/2" for a 2x6 stud wall, etc. The mesh would have a length of 5 units, a gap of .5, & then it would have either an x or two lines that cross in an x. The first x would be 6 units away from the next x. As far as the insulation goes, my version of autocad comes with a linetype called batting which i assume i could manipulate to get what i want if somebody could somebody please point me in the right direction. I'm sure it is probably pretty simple code to write but i am not sure how to start. Here is the code for the batting linetype.

 

 *BATTING,Batting SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS A,.0001,-.1,[BAT,ltypeshp.shx,x=-.1,s=.1],-.2,[BAT,ltypeshp.shx,r=180,x=.1,s=.1],-.1

 

 I enclosed my drawing for the wiremesh & the insulation for anyone to look at.

7 REPLIES 7
Message 2 of 8
CADaSchtroumpf
in reply to: sovby

Try this!

 

Is make with unit scale 1.0.

Force typeline scale by object for differents models:
3.5 for 3-1/2" et 5.5 for 5-1/2".

 

If you need, the source file of SHX is also joint.

 

The mesh is easy, you can make it.

Message 3 of 8
sovby
in reply to: CADaSchtroumpf

Thank you very much for replying but I'm not sure I understand your answer. I guess I need to find a tutorial somewhere that explains the procedures for custom line types because I don't understand the code that you wrote down for me or how it works. I loaded your line type in but it is way too big. I want to use a Linetype to represent insulation in a 2x4 or a 2x6 wall but I am not sure how to do it
Message 4 of 8
Kent1Cooper
in reply to: sovby


@sovby wrote:

I would like to create a wiremesh linetype as well as an insulation linetype that i can make 3-1/2" wide for a 2x4 stud wall, 5-1/2" for a 2x6 stud wall, etc. The mesh would have a length of 5 units, a gap of .5, & then it would have either an x or two lines that cross in an x. The first x would be 6 units away from the next x. As far as the insulation goes, my version of autocad comes with a linetype called batting which i assume i could manipulate to get what i want if somebody could somebody please point me in the right direction. I'm sure it is probably pretty simple code to write but i am not sure how to start. Here is the code for the batting linetype.

 

 *BATTING,Batting SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS A,.0001,-.1,[BAT,ltypeshp.shx,x=-.1,s=.1],-.2,[BAT,ltypeshp.shx,r=180,x=.1,s=.1],-.1

 

 I enclosed my drawing for the wiremesh & the insulation for anyone to look at.


Here's what I use for Insulation batting that makes something more like your drawing [no kinks or straight parts]:

 

Add this into your .SHP file [change the 142 if you need to, and the shape file name in the .LIN file line]:

 

*142,13,INSULBATT
13,(-1,3,-20),(4,0,-127),(-1,-3,-20),(0,0),0

 

And this into your .LIN file:

 

*INSULBATT,Insulation batting SSSSSSSSSSSSSSS
A,.0001,-.4,[INSULBATT,YourShapeFile.shx,x=-.4,s=.4],-.8,[INSULBATT,sashp.shx,r=180,x=.4,s=.4],-.4

 

For the size, just use different linetype scales, which you can also do with AutoCAD's Batting linetype.  In the case of my version, divide the thickness you want by your drawing ratio [in your sample, the DIMSCALE or LTSCALE System Variable = 48] and divide that by 4 [for 5-1/2", 5.5 divided by 48 divided by 4 = .0.286458].  Assign that to Lines [or whatever] in the Linetype scale window in the Properties box.  [We use a Linetype scale of 1/4 of the drawing ratio, so for us, we just divide the width we want by the drawing ratio.]

 

For AutoCAD's BATTING linetype, with a LTSCALE System Variable equal to your drawing ratio, you need to multiply the thickness you want by 1.25 and divide that by the drawing ratio.

 

For something that doesn't have the straight pieces at the ends when the length isn't just right, but draws something similar to your example [though with "tighter" loops], and has many other enhancements, try this:

 

http://cadtips.cadalyst.com/polylines/add-batting-insulation

 

I don't know why someone rated it at one star -- it's really pretty powerful [see the image posted with my first comment for an idea of what it will do].  It draws a looping Polyline, which will eat up more memory than the linetype approach, so don't use it unless you need its "improvements."

 

For a wire-mesh linetype, I use this:

 
*WWM,----x----x----x----x----x----x----
A,5.2,["x",ROMANS,S=1,R=0.0,X=0.0,Y=-.333],-0.8

 
Again, you have to adjust the linetype scale to get the X's spaced at 6".  [I can't confirm here at home, but it involves the spacing you want divided by the drawing ratio, perhaps with another multiplier.]

Kent Cooper, AIA
Message 5 of 8
CADaSchtroumpf
in reply to: sovby


sovby a écrit :
Thank you very much for replying but I'm not sure I understand your answer. I guess I need to find a tutorial somewhere that explains the procedures for custom line types because I don't understand the code that you wrote down for me or how it works. I loaded your line type in but it is way too big. I want to use a Linetype to represent insulation in a 2x4 or a 2x6 wall but I am not sure how to do it


Sorry, but i am French and is difficult for me to explain correctly.

 

But if i have understood; extract the files in the same folder where you have your "ltypeshp.shx".

After that, load the typline with "select file" and choice it in folder where is has been extracted.

Fixe scale of typeline to 1 (Your DWG have a general scale to 48) and by object for your different scale (3-1/2" and 5-1/2")

Message 6 of 8
sovby
in reply to: Kent1Cooper

Thanks, I will take a look at this. I would like to find a tutorial that explains all the code that you wrote for me so that I can create other custom linetypes in the future. I do appreciate your help though.
Message 7 of 8
Kent1Cooper
in reply to: sovby


@sovby wrote:
Thanks, I will take a look at this. I would like to find a tutorial that explains all the code that you wrote for me so that I can create other custom linetypes in the future. I do appreciate your help though.

You should be able to get all you need from the Customization Guide in Help, under "Custom Linetypes."  [And I didn't take any time or trouble to write them for you -- I've been using them for many years.]

Kent Cooper, AIA
Message 8 of 8
Anonymous
in reply to: CADaSchtroumpf

Thanks for that CADaStroumph, that's helped me!

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

Post to forums  

Autodesk Design & Make Report

”Boost