Jump to content

Settings of MultiLine style by Autolisp


Tharwat

Recommended Posts

Hello,

 

Is there any way to change the settings of MultiLine Style. I mean to be controlled by user inputs through Autolisp.

 

My best regards,

Tharwat

Link to comment
Share on other sites

Hello,

 

Is there any way to change the settings of MultiLine Style. I mean to be controlled by user inputs through Autolisp.

 

My best regards,

Tharwat

 

Use setvar and see the following:

 

 

CMLJUST

 

Type: Integer

Saved in: Drawing

Initial value: 0

 

Specifies multiline justification.

 

0 Top

1 Middle

2 Bottom

 

CMLSCALE

 

Type: Real

Saved in: Drawing

Initial value:

1.0000 (imperial) or 20.0000 (metric)

 

Controls the overall width of a multiline. A scale factor of 2.0 produces a multiline twice as wide as the style definition. A zero scale factor collapses the multiline into a single line. A negative scale factor flips the order of the offset lines (that is, the smallest or most negative is placed on top when the multiline is drawn from left to right).

 

CMLSTYLE

 

Type: String

Saved in: Drawing

Initial value: "STANDARD"

 

Sets the multiline style that AutoCAD uses to draw the multiline.

Link to comment
Share on other sites

Wonderful as usual Mr.Buzzard

 

And I do wonder if there is also any Variable that would control of the

Start and End points of MultiLine Style as well . ...?

 

Faithful

Tharwat

Link to comment
Share on other sites

Wonderful as usual Mr.Buzzard

 

And I do wonder if there is also any Variable that would control of the

Start and End points of MultiLine Style as well . ...?

 

Faithful

Tharwat

I am not exactly sure what you mean by controlling the Start point and End point of multiline. Of course there is always the AutoLisp function getpoint which I am sure you are already familiar with for selecting the points.

 

getpoint Function

 

Pauses for user input of a point, and returns that point

 

(getpoint [pt] [msg])

 

The user can specify a point by pointing or by entering a coordinate in the current units format. If the pt argument is present, AutoCAD draws a rubber-band line from that point to the current crosshairs position.

 

The user cannot enter another AutoLISP expression in response to a getpoint request.

 

Arguments

 

pt

 

A 2D or 3D base point in the current UCS.

 

Note that getpoint will accept a single integer or real number as the pt argument, and use the AutoCAD direct distance entry mechanism to determine a point. This mechanism uses the value of the LASTPOINT system variable as the starting point, the pt input as the distance, and the current cursor location as the direction from LASTPOINT. The result is a point that is the specified number of units away from LASTPOINT in the direction of the current cursor location.

 

msg

 

A string to be displayed to prompt the user.

 

Return Values

 

A 3D point, expressed in terms of the current UCS.

 

Examples

 

(setq p (getpoint))

(setq p (getpoint "Where? "))

(setq p (getpoint '(1.5 2.0) "Second point: "))

Link to comment
Share on other sites

Many thanks

 

I meant the Start and End points that are included within Mline Style as shown in the following image.

 

Thanks & Regards

End Start points Mline.jpg

Link to comment
Share on other sites

Many thanks

 

I meant the Start and End points that are included within Mline Style as shown in the following image.

 

Thanks & Regards

Ok, I see what you mean now. I do not use mline, So I was unsure. You can check the link alanjt provided. Entmake is a better way to go.

Link to comment
Share on other sites

I took a look at mlstyle. If you save a custom mlstyle to acad.mln with your desired settings all you need to do is call it up with cmlstyle variable. This of course is one way if you do not decide to go with entmake. As I have shown you in post 2, These seem to be the only settings you can change on the fly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...