Author Topic: Water Hatch?  (Read 13646 times)

0 Members and 1 Guest are viewing this topic.

craigr

  • Guest
Re: Water Hatch?
« Reply #15 on: February 02, 2010, 11:45:26 AM »
I thought to be part of a linetype, the 'object' has to be some form of a text symbol - like a X or such. (?).

craigr

JCTER

  • Guest
Re: Water Hatch?
« Reply #16 on: February 02, 2010, 11:48:31 AM »
Nah, you can create a Shape file (.shp) and "compile" it into a .shx file, which can be referenced into a linetype.  You can put any ol' shape you can draw into a linetype.  I saw someone create a linetype that creates a string of christmas lights, once.  Was pretty neat.  Long time ago though, and they were a bit funny looking.

Anyways, yea, I'm a bit lazy today, so here's the help file:

Quote
A complex linetype can contain embedded shapes that are saved in shape files. Complex linetypes can denote utilities, boundaries, contours, and so on.

As with simple linetypes, complex lines are dynamically drawn as the user specifies vertices. Shapes and text objects embedded in lines are always displayed completely; they are never trimmed.

The syntax for complex linetypes is similar to that of simple linetypes in that it is a comma-delimited list of pattern descriptors. Complex linetypes can include shape and text objects as pattern descriptors, as well as dash-dot descriptors.

The syntax for shape object descriptors in a linetype description is as follows:

[shapename,shxfilename] or [shapename,shxfilename,transform]
where transform is optional and can be any series of the following (each preceded by a comma):

R=## Relative rotation

A=## Absolute rotation

S=## Scale

X=## X offset

Y=## Y offset

In this syntax, ## is a signed decimal number (1, -17, 0.01, and so on), the rotation is in degrees, and the remaining options are in linetype-scaled drawing units. The preceding transform letters, if they are used, must be followed by an equal sign and a number.

The following linetype definition defines a linetype named CON1LINE that is composed of a repeating pattern of a line segment, a space, and the embedded shape CON1 from the ep.shx file. (Note that the ep.shx file must be in the support path for the following example to work properly.)

*CON1LINE, --- [CON1] --- [CON1] --- [CON1]
A,1.0,-0.25,[CON1,ep.shx],-1.0
Except for the code enclosed in square brackets, everything is consistent with the definition of a simple linetype.

As previously described, a total of six fields can be used to define a shape as part of a linetype. The first two are mandatory and position-dependent; the next four are optional and can be ordered arbitrarily. The following two examples demonstrate various entries in the shape definition field.

[CAP,ep.shx,S=2,R=10,X=0.5]
The code above draws the CAP shape defined in the ep.shx shape file with a scale of two times the unit scale of the linetype, a tangential rotation of 10 degrees in a counterclockwise direction, and an X offset of 0.5 drawing units before shape elaboration takes place.

[DIP8,pd.shx,X=0.5,Y=1,R=0,S=1]
The code above draws the DIP8 shape defined in the pd.shx shape file with an X offset of 0.5 drawing units before shape drawing takes place, and a Y offset of one drawing unit above the linetype, with 0 rotation and a scale equal to the unit scale of the linetype.

The following syntax defines a shape as part of a complex linetype.

[shapename,shapefilename,scale,rotate,xoffset,yoffset]
The definitions of the fields in the syntax follow.

shapename
The name of the shape to be drawn. This field must be included. If it is omitted, linetype definition fails. If shapename does not exist in the specified shape file, continue drawing the linetype but without the embedded shape.

shapefilename
The name of a compiled shape definition file (SHX). If it is omitted, linetype definition fails. If shapefilename is unqualified (that is, no path is specified), search the library path for the file. If shapefilename is fully qualified and not found at that location, remove the prefix and search the library path for the file. If it is not found, continue drawing the linetype but without the embedded shape.

scale
S=value. The scale of the shape is used as a scale factor by which the shape's internally defined scale is multiplied. If the shape's internally defined scale is 0, the S=value alone is used as the scale.

rotate
R=value or A=value. R= signifies relative or tangential rotation with respect to the line's elaboration. A= signifies absolute rotation of the shape with respect to the origin; all shapes have the same rotation regardless of their relative position to the line. The value can be appended with a d for degrees (if omitted, degree is the default), r for radians, or g for grads. If rotation is omitted, 0 relative rotation is used.

xoffset
X=value. The shift of the shape in the X axis of the linetype computed from the end of the linetype definition vertex. If xoffset is omitted or is 0, the shape is elaborated with no offset. Include this field if you want a continuous line with shapes. This value is not scaled by the scale factor defined by S=.

yoffset
Y=value. The shift of the shape in the Y axis of the linetype computed from the end of the linetype definition vertex. If yoffset is omitted or 0, the shape is elaborated with no offset. This value is not scaled by the scale factor defined by S=.


JCTER

  • Guest
Re: Water Hatch?
« Reply #17 on: February 02, 2010, 11:50:46 AM »
Do you have Express Tools in LT?

If so, there are commands to vastly simplify the process.

Quote
MKSHAPE

--------------------------------------------------------------------------------

Creates a shape definition based on selected objects.

Command: MKSHAPE
Select a ".SHP" file: <drawing.shp>: Enter a shape file name where you would like to save your shape
Reading shape file: drawing.shp...Done.
Enter the name of the shape: Specify the shape name
Enter resolution <124>: Enter a number for the resolution value (see Resolution Values below.)
Insertion base point: Specify a point
Select objects: Select line, polyline, lwpolyline, arc, circle, and/or ellipse objects (for definition purposes, the selected objects are treated as though they are of a continuous linetype)

Determining geometry extents...Done.
Building coord lists...Done.
Formatting coords...Done.
Writing new shape...Done.

Compiling shape/font description file
Compilation successful. Output file C:\Express\drawings\drawing.shx contains 152 bytes.

Use the SHAPE command to place shapes in your drawing.



JCTER

  • Guest
Re: Water Hatch?
« Reply #18 on: February 02, 2010, 11:52:07 AM »
Quote
MKLTYPE

--------------------------------------------------------------------------------

Creates a linetype based on selected objects.

Command: MKLTYPE
Select a ".LIN" file: <C:\Express\Drawings\acad.lin>: Enter a linetype file name and directory path
Enter linetype name: Specify a linetype name
Linetype description: Specify a linetype description
Starting point for line definition: Specify a starting point
Ending point for line definition: Specify an ending point
Select objects: Select a line, polyline, lwpolyline, point, shape, and/or text object



craigr

  • Guest
Re: Water Hatch?
« Reply #19 on: February 02, 2010, 11:52:15 AM »
No, unfortunately not.

I know that the Full version has sooooo many neat tools.

I wish we could afford to get at least ONE copy of Full CAD to allow me to do some of the neat things you Full Version folks do.

craigr

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Water Hatch?
« Reply #20 on: February 02, 2010, 11:53:17 AM »
Boy was I slow to respond but I'll post anyway.

Possible, Yes definitely.
The results you want, maybe.
Two ways that come to mind are use a shape file which means including the shape.
Or use a special character which means the font must be included.

My choice would be to use the parentheses character (  which can be rotated 90 degrees
in the line type.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

craigr

  • Guest
Re: Water Hatch?
« Reply #21 on: February 02, 2010, 11:53:34 AM »
MKLTYPE - Not a valid command in LT.

JCTER

  • Guest
Re: Water Hatch?
« Reply #22 on: February 02, 2010, 11:53:45 AM »
Well you can still create shape files, compile them into shx files, and insert them into a linetype definition, you just have to do it the long way.

I like CAB's suggestion about using hte parenthesis rotated... that's probably the best K.I.S.S. method yet. 

For example, it might be :


*WATER,Water Linetype UUUUUUUUUUU
A,.001,["(",STANDARD,S=1,R=90.0,X=0.001,Y=0.001]


I think lines have to start with a dash/dot of some kind, not sure.  You could try adding the above two lines into your .lin file and see what happens.  If it appears upside down, either use the other parenthesis, or change R=90.0 to R=270.0.  One or the other.
« Last Edit: February 02, 2010, 11:57:08 AM by James Cannon »

craigr

  • Guest
Re: Water Hatch?
« Reply #23 on: February 02, 2010, 11:56:06 AM »
I like the 'parentheses' - that is exactly what I am after.

craigr

craigr

  • Guest
Re: Water Hatch?
« Reply #24 on: February 02, 2010, 02:36:32 PM »
In the following example, (thanks), I keep getting the error 'There must be from 2 to 12 dash/dot specifications'

*WATER,Water Linetype UUUUUUUUUUU
A,.001,["(",STANDARD,S=1,R=90.0,X=0.001,Y=0.001]


What does this error mean?

- (This stuff is waaaay above me, but I'm trying.)

craigr

JCTER

  • Guest
Re: Water Hatch?
« Reply #25 on: February 02, 2010, 02:42:04 PM »
Sorry, I didn't check my work before suggesting it.  Let me try again.


*WATER,Water Linetype UUUUUUUUUUU
A,0,["(",STANDARD,S=1,R=90.0,X=0.001,Y=0.001],-.001

That works for me, but the parenthesis doesn't show up for me.  I'll figure that out and post back.  I haven't messed with linetypes in a long time, I'm sorry.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Water Hatch?
« Reply #26 on: February 02, 2010, 02:53:35 PM »
Quote
;;; WATER LINE
*WATER LINE,UUUUUUUUUUUUU
A,0.1,[")",STANDARD,S=.1,R=270.0,X=.1,Y=0.03],-.1
I was using SIMPLEX for the STANDARD text style.

Not sure how you'd get rid of the horizontal line though...

Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

JCTER

  • Guest
Re: Water Hatch?
« Reply #27 on: February 02, 2010, 02:55:31 PM »
*WATER,Water Linetype UUUUUUUUUUU
A,-0,["(",STANDARD,S=.5,R=90.0,X=-0.188,Y=-.25],-0.75

Make the line into a dot, and it minimizes the impact.  I also scooted the X and Y of the rotated parenthesis to overlap all the repeated dots.  However, the initial starting dot will just have to be "put up with" unless someone can fix that, too.  I can't.

JCTER

  • Guest
Re: Water Hatch?
« Reply #28 on: February 02, 2010, 02:56:35 PM »
With my standard text style set to use RomanS, I get this:

Note, you may adjust the scale of the text (S=.5)  by tiny bits, and reload the linetype to get the squiggles to line up perfectly... you can see they barely overlap in my screenshot.  Also, you can see how the "Dots" aren't EXACTLY at the peak of the 'waves'.

I have no dashes defined in the linetype.  AutoCAD automatically adds them in because it has to.  It's dumb.  It has to have a dash or a dot in the line otherwise it doesn't know what it's doing, so it adds them in at the beginning of the linetype, even if you tell it to only use spaces (as I did)

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Water Hatch?
« Reply #29 on: February 02, 2010, 02:57:38 PM »
With my standard text style set to use RomanS, I get this:
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io