Author Topic: Scale button to quickly set ltscale do desired scale?  (Read 3598 times)

0 Members and 1 Guest are viewing this topic.

donniedrake

  • Guest
Scale button to quickly set ltscale do desired scale?
« 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!

BlackBox

  • King Gator
  • Posts: 3770
Re: Scale button to quickly set ltscale do desired scale?
« Reply #1 on: October 23, 2014, 11:32:22 AM »
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:

Code: [Select]
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
« Last Edit: October 23, 2014, 11:35:47 AM by BlackBox »
"How we think determines what we do, and what we do determines what we get."

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Scale button to quickly set ltscale do desired scale?
« Reply #2 on: October 23, 2014, 11:37:35 AM »
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.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

BlackBox

  • King Gator
  • Posts: 3770
Re: Scale button to quickly set ltscale do desired scale?
« Reply #3 on: October 23, 2014, 11:41:15 AM »
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
"How we think determines what we do, and what we do determines what we get."

donniedrake

  • Guest
Re: Scale button to quickly set ltscale do desired scale?
« Reply #4 on: October 23, 2014, 12:25:56 PM »
Using ACAD Map 11, primarily need to set the ltscale so blocks are inserted to the desired/selected scale.

BlackBox

  • King Gator
  • Posts: 3770
Re: Scale button to quickly set ltscale do desired scale?
« Reply #5 on: October 23, 2014, 12:28:09 PM »
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
"How we think determines what we do, and what we do determines what we get."

donniedrake

  • Guest
Re: Scale button to quickly set ltscale do desired scale?
« Reply #6 on: October 23, 2014, 12:38:22 PM »
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 :)

BlackBox

  • King Gator
  • Posts: 3770
Re: Scale button to quickly set ltscale do desired scale?
« Reply #7 on: October 23, 2014, 12:39:27 PM »
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
"How we think determines what we do, and what we do determines what we get."

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Scale button to quickly set ltscale do desired scale?
« Reply #8 on: October 23, 2014, 02:23:15 PM »
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
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Scale button to quickly set ltscale do desired scale?
« Reply #9 on: October 23, 2014, 02:27:12 PM »
At the risk of sounding obvious... Shouldn't you use acadiso.lin for metric drawings?

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Scale button to quickly set ltscale do desired scale?
« Reply #10 on: October 23, 2014, 02:36:50 PM »
At the risk of sounding obvious... Shouldn't you use acadiso.lin for metric drawings?
Exactly .. if your MEASUREMENT variable is set correctly, you should not have to worry about it.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Scale button to quickly set ltscale do desired scale?
« Reply #11 on: October 23, 2014, 03:51:38 PM »
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.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

donniedrake

  • Guest
Re: Scale button to quickly set ltscale do desired scale?
« Reply #12 on: October 23, 2014, 04:04:35 PM »
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!