Print Page | Close Window

Linetype Scale Scripting

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=12087
Printed Date: 31.May.2026 at 23:32


Topic: Linetype Scale Scripting
Posted By: tower123
Subject: Linetype Scale Scripting
Date Posted: 28.Oct.2016 at 15:20
Is it possible to edit my current script so that I can give certain layers a different linetype scale rather than just giving a universal scale of 1 to all?



Replies:
Posted By: rebellio
Date Posted: 28.Oct.2016 at 15:51
What does your current script do?
 
And quick select could be an option.........


Posted By: John Connor
Date Posted: 28.Oct.2016 at 16:10
Doesn't the QSELECT command open a dialog window?  Is there a command line version of QSELECT that can be used in a script or are you suggesting the script call a lisp routine?

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: rebellio
Date Posted: 31.Oct.2016 at 10:44
Hi,
 
You are right John qselect pops up a dialog window that can not be turned off.
There is also no line command for it.
However when combining the "selectsimilar" and the "change" command it is possible to use it in lisp.
If OP replys and explain what his script does it would be easyer to search for a solution.
We dont know what OP expects from the script.......
However ltscale remains a system variable so you can not define "lt scales" by layer but you can change it by layer.
 
Regards


Posted By: Kent Cooper
Date Posted: 31.Oct.2016 at 16:12
It would certainly be easy to make a routine that would find everything [already drawn] on a given Layer and assign a linetype scale to all of them.  It would not, however, cause anything drawn later on that Layer to have that linetype scale.  As already noted, Layers can't have linetype scales assigned to them different from the general current-entity scale.  A wish-list item....
 
I haven't worked with reactors, but that might be a way to accomplish it, if a reactor can be triggered by setting a particular Layer current.  It could presumably set the current-entity linetype scale to what you want, so that new things drawn on that Layer would be at that scale.  But whether the linetype scale could be set back [presumably to 1] when you change to any different current Layer, I'm not sure -- someone with more experience with reactors could probably say.
 
Routines could also be made [without reactors] that would do that linetype-scale setting change when called, allow you to draw some specific thing, and set the linetype scale back when finished.  For instance, you could have a command for drawing a Line on that Layer, and one for drawing a Circle on that Layer.  One could probably also contain entity-type options within such a command, to set the Layer and linetype scale for whatever among those options you choose, and set both back when you're done.  Would something like that work?



Print Page | Close Window