Subject: Syntax for a complex linetype definition



Complex linetypes can include shape and text entities as pattern descriptors, as well as the dash and dot descriptors of simple linetypes.

The shape descriptor syntax

You can add a shape entity to a complex linetype using the following syntax:

[shape_name, shape_filename] or [shape_name, shape_filename, transform]

The definitions of the fields in the syntax are as follows.

shape_name

The name of the shape to add to the linetype. The shape name must exist in the specified shape file (shape_filename).

shape_filename

The name of a compiled shape definition file (extension *.shx). If no path is defined for the shape file name, the library path is searched for the file.

transform

The transform argument is optional and can be any series of the following (each preceded by a comma):

R=value   Relative rotation

A=value   Absolute rotation

S=value   Scale

X=value   X offset

Y=value   Y offset

In this syntax, value represents a signed decimal number. The rotation is expressed in degrees while the other options are in linetype scaled drawing units.

rotation

R=value or A=value

R= determines a relative or tangential rotation with respect to the line’s elabora­tion.

A= determines an 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 (default), r for radians, or g for grads. If rotation is omitted, 0 relative rotation is used.

scale

S=value

Determines a factor by which the shape's internal scale is multiplied. If the shape's internal scale is 0, the scale value is used as the scale.

X offset

X=value

Determines a shift of the shape along the X axis of the linetype computed from the end of the linetype definition vertex. If X offset 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.

Y offset

Y=value

Determines a shift of the shape along the Y axis of the linetype computed from the end of the linetype definition vertex. If Y offset is omitted or 0, the shape is elabo­rated with no offset. This value is not scaled by the scale factor defined by S.

The text descriptor syntax

You can add a text entity to a complex linetype using the following syntax:

["string", style_name] or ["string", style_name, transform]

The definitions of the fields in the syntax are as follows.

string

The text to be used in the complex linetype. You cannot use the ` or the " charac­ters in the text string. To use these characters, enter a control code (%%) with the ASCII value for the character instead.

style_name

The name of the text style to be elaborated. The specified text style must be included. If it is omitted, use the currently defined style.

transform

The transform argument is optional and can be any series of the following (each preceded by a comma):

R=value   Relative rotation

A=value   Absolute rotation

S=value   Scale

X=value   X offset

Y=value   Y offset

In this syntax, value represents a signed decimal number. The rotation is expressed in degrees while the other options are in linetype scaled drawing units.

rotation

R=value or A=value

R= determines a relative or tangential rotation with respect to the line’s elabora­tion.

A= determines an absolute rotation of the text with respect to the origin. All text has the same rotation regardless of its relative position to the line. The value can be appended with a d for degrees (default), r for radians, or g for grads. If rotation is omitted, 0 relative rotation is used.

Rotation is centered between the baseline and the nominal cap heights box.

scale

S=value

Determines a factor by which the style's height is multiplied. If the style's height is 0, the scale value is used as the scale.

Because the final height of the text is defined by both the scale value and the height assigned to the text style, you will achieve more predictable results by set­ting the text style height to 0. It is recommended that you create separate text styles for text in complex linetypes to avoid conflicts with other text in your draw­ing.

X offset

X=value

Determines a shift of the text along the X axis of the linetype computed from the end of the linetype definition vertex. If X offset is omitted or is 0, the text is elab­orated by using the lower left corner of the text as the offset. Include this field if you want a continuous line with text. This value is not scaled by the scale factor that is defined by S.

Y offset

Y=value

Determines a shift of the text along the Y axis of the linetype computed from the end of the linetype definition vertex. If Y offset is omitted or is 0, the text is elab­orated by using the lower left corner of the text as the offset. This value is not scaled by the scale factor that is defined by S.

Syntax_for_a_complex_linetype_definition
© Copyright 2022. BackToCAD Technologies LLC. All rights reserved. Kazmierczak® is a registered trademark of Kazmierczak Software GmbH. Print2CAD, CADdirect, CAD.direct, CAD Direct, CAD.bot, CAD Bot, are Trademarks of BackToCAD Technologies LLC. DWG is the name of Autodesk’s proprietary file format and technology used in AutoCAD® software and related products. Autodesk, the Autodesk logo, AutoCAD, DWG are registered trademarks or trademarks of Autodesk, Inc. All other brand names, product names, or trademarks belong to their respective holders. This website is independent of Autodesk, Inc., and is not authorized by, endorsed by, sponsored by, affiliated with, or otherwise approved by Autodesk, Inc. The material and software have been placed on this Internet site under the authority of the copyright owner for the sole purpose of viewing of the materials by users of this site. Users, press or journalists are not authorized to reproduce any of the materials in any form or by any means, electronic or mechanical, including data storage and retrieval systems, recording, printing or photocopying.