AutoLisp changing line type

AutoLisp changing line type

Anonymous
Not applicable
2,570 Views
3 Replies
Message 1 of 4

AutoLisp changing line type

Anonymous
Not applicable
Hello guys, I have a figure assigned to me by professor in my uni to be programmed using AutoLisp. I did it, but there is two lines that needs to be hidden type, how can I change only those two lines that they would be hidden? When I type in the command and the whole figure appears and those two lines would be hidden.
Ps. I didint know in which section to put it, so sorry. Im using autocad 2015
0 Likes
2,571 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

Welcome to these Forums!  [The Visual Lisp, AutoLisp and General Customization Forum would be the best place to ask this.  When you do, if you can post the code you have so far, someone can more easily suggest how to adjust it, but if it's something like homework, I hope they won't do it for you.  The appropriate way may depend on how you are creating those Lines, and there are several ways it could be done.]

Kent Cooper, AIA
0 Likes
Message 3 of 4

scot-65
Advisor
Advisor
HUGE HINTS:

First check if the desired linetype is loaded.
(tblsearch "LTYPE" "Continuous")
If not, then load it.

Select existing objects to change:
Use ENTMOD to change the object's linetype.
The DFX code for this is 6.
Alternate is command CHPROP.

Creating new objects on the fly:
Play with CELTYPE.

Good Luck!

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

@scot-65 wrote:
....
First check if the desired linetype is loaded.
(tblsearch "LTYPE" "Continuous")
If not, then load it.
....

Not necessarily.  This is why I wanted them to show how they are making the Lines they want to give an override linetype to.  If you can accomplish what's needed with a CHPROP command's LType option, and it's a linetype defined in ACAD.lin [such as their Hidden example], it does not need to be loaded first -- it will find it.  That's an advantage over the use of (entmake) in creating the LInes or (subst)/(entmod) afterwards, either of which I believe would require it to be loaded already.  [Same thing in assigning linetypes to Layers in a command-line Layer command.]

Kent Cooper, AIA
0 Likes