TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: donniedrake on October 23, 2014, 11:10:59 AM
-
Just started with a new company and they have very old lsp routines that aren't functioning. I'm trying to create a button that will pop up a box and set the ltscale to the scales used here. Also set the dimscale to match the selected scale. Anything out there already? Started this lsp, but fairly new to lsp so any help would be much appreciated!
-
Welcome to TheSwamp!
Not sure what version(s) you're now using, but is there any chance of moving to Annotative Scales instead?
I ask, as changing a drawing's Model, or PViewport annotation scale automagically modifies linetype and dim-scales for you... To test for yourself, use LTSCALE == 1, MSLTSCALE == 1, and PSLTSCALE == 1 (and some pre-defined annotation scales, of course).
[Edit] - This would also allow you to use the in-built UI, precluding the need for a custom dialog.
Example:
Command: SYSVARWATCH
SYSVARWATCH = ON
Command:
Command: _CANNOSCALE
Enter new value for CANNOSCALE <"1" = 20'">: 1" = 30'
[SysVarWatch] : System Var Changed : DIMSCALE = 30.0
[SysVarWatch] : System Var Changed : CANNOSCALE = 1" = 30'
Command: SYSVARWATCH
SYSVARWATCH = OFF
Command:
Cheers
-
One addendum to BlackBox's comment above - if you are using linetypes from ACAD.LIN in a metric drawing, chances are the global LTSCALE setting will be 10 rather than 1.
-
One addendum to BlackBox's comment above - if you are using linetypes from ACAD.LIN in a metric drawing, chances are the global LTSCALE setting will be 10 rather than 1.
Thank you, Sir; I do often neglect metric. *Tips hat*
Cheers
-
Using ACAD Map 11, primarily need to set the ltscale so blocks are inserted to the desired/selected scale.
-
Using ACAD Map 11, primarily need to set the ltscale so blocks are inserted to the desired/selected scale.
Good; so if you set your block as annotative, it will automagically display at the correct size, so long as your drawing's Model, or PViewport annotation scale is set accordingly. :-)
Cheers
-
Gotcha, I'll try and see how they are running the annoscale, they have blocks all over the place with different scales and properties. Kind of a cluster here :)
-
Gotcha, I'll try and see how they are running the annoscale, they have blocks all over the place with different scales and properties. Kind of a cluster here :)
No worries; just be sure to back everything up before you modify. :angel: #CYA
-
One addendum to BlackBox's comment above - if you are using linetypes from ACAD.LIN in a metric drawing, chances are the global LTSCALE setting will be 10 rather than 1.
Thank you, Sir; I do often neglect metric. *Tips hat*
Cheers
*#@#^ Imperials. Rebel Metric Alliance, rise up! :-P
-
At the risk of sounding obvious... Shouldn't you use acadiso.lin for metric drawings?
-
At the risk of sounding obvious... Shouldn't you use acadiso.lin for metric drawings?
Exactly .. if your MEASUREMENT (http://help.autodesk.com/view/CIV3D/2015/ENU/?guid=GUID-1D074C55-0B63-482E-8A37-A52AC0C7C8FE)variable is set correctly, you should not have to worry about it.
-
At the risk of sounding obvious... Shouldn't you use acadiso.lin for metric drawings?
Yes. But a number of companies that have been around for a while continue to use ACAD.LIN with an appropriate global LTSCALE. It took quite an effort to get my own users on board with using units-correct data files. Up to that point they were merrily going along since it worked. If they needed a linetype they would find any ACAD.LIN file (why look at something else?) and load from there. There wasn't any reason for them to look at other files until MSLTSCALE and PSLTSCALE came along and made life difficult for them. That, and I implemented automation which loads everything for them from the appropriate files.
-
And that's exactly where I'm at, I dont see them listening or wanting to get with the times either. Just set the ltscale and run......frustratedly!