Author Topic: Setting psltscale between model and paper space... Can it be improved  (Read 9708 times)

0 Members and 1 Guest are viewing this topic.

sourdough

  • Bull Frog
  • Posts: 367
Hi all
    The company I'm consulting with now is using something I modified and would like to hear from the pro's here on this code.
The object with them was to set PSLTSCALE to 0 in modelspace and keep the ltscale equal to the dwg scale, and in paperspace have PSLSTCALE to 1 with the ltscale set to 0.5. Is there a better way. This works great except when you don't us it when just picking tabs
it won't set and all the linetypes go solid.

Code: [Select]

(defun c:tm (/ sid)

(setq sid 1)

(if (= (getvar "TILEMODE") 1)
   (progn
   (setvar "ltscale" (* 0.5 sid))
   (setvar "psltscale" 1)
   (command "_layout" "set" "")(setvar "users5" (getvar "ctab"))
  
)
   (progn
   (setvar "CMDECHO" 0)
   (setvar "psltscale" 0)
   (command "_layout" "set" "model")(setvar "users5" "model")
  
  
   )
)

;(princ)
(princ)
)



;;*************************************************************************************************

So, is there a better way to do this so that I can just select tabs and have the variables mentioned follow like this
code? Will this have to be a reactor? I have used reactor's in the past and it wasn't stable, so much.

Thanks in Advance

MJP
« Last Edit: December 31, 2010, 08:39:28 PM by sourdough »
LDC 2009/C3D 2010/C3D 2011/C3D 2016

Win 10 64bit

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #1 on: December 31, 2010, 11:37:09 AM »
why would you be setting PAPERSPACE ltscale in modelspace at all is my first question?

Second question is what are they using, C3D or regular autocad?

I've seen this work 'best' with a toolbar button.

You might also find better suggestions and help by posting this in the LISP discussions.

Be your Best


Michael Farrell
http://primeservicesglobal.com/

sourdough

  • Bull Frog
  • Posts: 367
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #2 on: December 31, 2010, 11:48:28 AM »
why would you be setting PAPERSPACE ltscale in modelspace at all is my first question?

Second question is what are they using, C3D or regular autocad?

I've seen this work 'best' with a toolbar button.

You might also find better suggestions and help by posting this in the LISP discussions.



Happy New Year to you Mike. Yes, it could be better placed there in hind-sight, if the forum monitor wants to, then please move it there.
The rational was to help them not to have to hassle with the switch 80 times a day, rather make it mindless. It's not my call, they
asked me for some help and this works and it is simple. So, I would love to hear now from the coders here about this. Your option is noted and thanks. If there is a way to set the ltscale to always be (0.5) in paperspace and not in modelspace please do tell. We use this because the linetypes always look the same in modelspace and through a viewport, thus the use of setting the PSLTSCALE 0 in model and PSLTSCALE 1 in paperspace. 

All thoughts welcome

MJP

MJP
LDC 2009/C3D 2010/C3D 2011/C3D 2016

Win 10 64bit

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #3 on: December 31, 2010, 11:58:13 AM »
let me look to verify...however my understanding is this
whatever PSLTSCALE is set at has no impact on MSLTSCALE
so yes this could be set un their startup doc.

again what are they using Autocad or Civil 3d, as that has some impact on methods and solutions
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #4 on: December 31, 2010, 12:04:56 PM »
or just change the linetype definitions that they use, such that no scaling is required at all
this could be the easiest in the long run
so instead of using acad.lin file they would use halfacad.lin for example
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #5 on: December 31, 2010, 12:14:35 PM »
this might also be a typical case where their process is the issue, and coding around it isn't the best possible solution...sometimes folks don't like to hear that; however I've seen far too many instances of code being used to attempt to correct process when all that was actually required was a simple process change....

and if this is for 'civil' type drawings then it certainly appears to be the case.

perhaps something as simple as do all of the 'modeling' in model space...and then use XREFS to assemble the 'sheets' and limit or eliminate all drawing of 'lines' in paperspace at all.

Again; I would need a better outline of what they are attempting to achieve, and not what they are already doing to suggest otherwise.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Dinosaur

  • Guest
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #6 on: December 31, 2010, 12:23:33 PM »
There is a routine buried somewhere in TheSwamp that solved exactly this situation to my particularly nit picky standards.  I might even have a copy of it stashed in my box of tools I no longer need.  I will see what I can find, but it may take a while.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #7 on: December 31, 2010, 12:26:33 PM »
Wouldn't setting these be the same thing, except you need do it only once...

LTSCALE 0.5 (or 1.0 if using other definitions as MJF suggested)
MSLTSCALE 1
PSLTSCALE 1 (this needs to be set for each Layout)

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #8 on: December 31, 2010, 12:39:24 PM »
Wouldn't setting these be the same thing, except you need do it only once...

LTSCALE 0.5 (or 1.0 if using other definitions as MJF suggested)
MSLTSCALE 1
PSLTSCALE 1 (this needs to be set for each Layout)

those were almost EXACLTY my thoughts...why code...what needs no code to achieve?

Be your Best


Michael Farrell
http://primeservicesglobal.com/

sourdough

  • Bull Frog
  • Posts: 367
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #9 on: December 31, 2010, 09:43:29 PM »
Wouldn't setting these be the same thing, except you need do it only once...

LTSCALE 0.5 (or 1.0 if using other definitions as MJF suggested)
MSLTSCALE 1
PSLTSCALE 1 (this needs to be set for each Layout)

The company has there msltscale set to 1 already. When I was at the office they couldn't get it keep the psltscale to set to one
 in a layout. I believe why this has happened over and over is that these old dwg's that they were created in Eagle Point
 and LDD so some variables didn't exist. I believe they went from 2004 LDD to Civil 3D 2011, quite a jump and a lot of
 variables that needed to be added. Thus, my coding to help with the process. We are in the process of
redoing over 3 years worth of work done in that older format to C3D 2011. So, this won't be very normal for most of us. So, my routine
does reset those variables and fixes each layout when you run it. They were getting really annoyed having to set the
 variables manually for so many dwg's and so many layouts... can you imagine?

MJP
« Last Edit: December 31, 2010, 09:54:45 PM by sourdough »
LDC 2009/C3D 2010/C3D 2011/C3D 2016

Win 10 64bit

sourdough

  • Bull Frog
  • Posts: 367
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #10 on: December 31, 2010, 09:44:16 PM »
There is a routine buried somewhere in TheSwamp that solved exactly this situation to my particularly nit picky standards.  I might even have a copy of it stashed in my box of tools I no longer need.  I will see what I can find, but it may take a while.

Let me know if you find it, curious for sure.

MJP
LDC 2009/C3D 2010/C3D 2011/C3D 2016

Win 10 64bit

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #11 on: December 31, 2010, 10:01:52 PM »
Wouldn't setting these be the same thing, except you need do it only once...

LTSCALE 0.5 (or 1.0 if using other definitions as MJF suggested)
MSLTSCALE 1
PSLTSCALE 1 (this needs to be set for each Layout)

The company has there msltscale set to 1 already. When I was at the office they couldn't get it keep the psltscale to set to one
 in a layout. I believe why this has happened over and over is that these old dwg's that they were created in Eagle Point
 and LDD so some variables didn't exist. I believe they went from 2004 LDD to Civil 3D 2011, quite a jump and a lot of
 variables that needed to be added. Thus, my coding to help with the process. We are in the process of
redoing over 3 years worth of work done in that older format to C3D 2011. So, this won't be very normal for most of us. So, my routine
does reset those variables and fixes each layout when you run it. They were getting really annoyed having to set the
 variables manually for so many dwg's and so many layouts... can you imagine?

MJP
I'm going to strongly suggest you watch my AU Virtual class on project migration to move those old projects forward (No Cost Project Migration is the class title).  It removes all these issues and it only takes minutes to perform.  I'm also going to suggest that they get proper training, and stop trying to solve these issues with code that can best be solved with knowledge.

I can promise the 'problems' will go away, and not one line of code will be required to be written.

This process could be more productive.
« Last Edit: December 31, 2010, 10:29:28 PM by Higgs Boson's Mate »
Be your Best


Michael Farrell
http://primeservicesglobal.com/

sourdough

  • Bull Frog
  • Posts: 367
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #12 on: January 01, 2011, 10:03:42 AM »
I found your tutorial in AU, and am watching. I have noticed that you haven't suggested anything for migrating Eagle Point data just LDD. Most all of there survey data hasn't been available to get into C3D points with any utilities in C3D. I could really use a tool for that. I did find a way to extract Eagle point with the Tools menu and Data Extraction and after a couple of tries got the point data out, but that is laborious at best. A real routine would be necessary for years worth of dwgs that need to be updated to Acad 2011 format. Any suggestions anyone?

  They have had one class on Civil 3D. They don't do much Civil 3D, but wanted to upgrade. The do profile (very basic) and survey plats, so doing extensive training would be wasted. They are mostly Survey and no Civil at all, just 4 LS's and 2 cad people. I had to fight them to stop taking pieces of the base dwg and doing updates off to the side. They didn't want to use the tools in Autocad like annotative text, so I had a uphill battle, but they are growing.

MJP
« Last Edit: January 01, 2011, 11:30:57 AM by sourdough »
LDC 2009/C3D 2010/C3D 2011/C3D 2016

Win 10 64bit

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #13 on: January 01, 2011, 11:46:04 AM »
Mike, can you get me a drawing with some EP points/data in it? I've never used EP so have nothing to test with......even if it's a very stripped down version of one of their drawings, I just need something to look at to see what needs to be converted.

Thanks and Happy New Year!
Jeff

sourdough

  • Bull Frog
  • Posts: 367
Re: Setting psltscale between model and paper space... Can it be improved
« Reply #14 on: January 01, 2011, 12:02:24 PM »
Mike, can you get me a drawing with some EP points/data in it? I've never used EP so have nothing to test with......even if it's a very stripped down version of one of their drawings, I just need something to look at to see what needs to be converted.

Thanks and Happy New Year!
Jeff

Jeff, Happy New Year to you too, here is a small but representative file (see attached)
 I have done some googling and it seems Survcadd and Eaglepoint use the same format, but not 100% on that.
Here is what I got when I used menu Tools/Data Extraction, see .cvs file (see attached)
Jeff, I'll try to send the .dxe file that goes with that so you can see what it is extracting to your email.

Thanks so much
MJP
« Last Edit: January 01, 2011, 12:19:21 PM by sourdough »
LDC 2009/C3D 2010/C3D 2011/C3D 2016

Win 10 64bit