Author Topic: ( C3D ) Linetypes in Model Space?  (Read 9360 times)

0 Members and 1 Guest are viewing this topic.

sinc

  • Guest
( C3D ) Linetypes in Model Space?
« on: November 19, 2006, 10:18:00 AM »
I notice that C3D seems to want to work with PSLTSCALE=1 and LTSCALE=1.

However, there's a problem with this, that has existed since Autodesk introduced paperspace.  When Autocad is set this way, no linetypes are visible in modelspace.  This makes it harder to work in drawings.  Since this problem has already existed for so many years, I suspect it's one of those things that Autodesk doesn't think is a problem and refuses to fix.

Is there any workaround for this issue?  Do people just get used to working in drawings that don't display linetypes?  Or do people usually just switch it back to PSLTSCALE=0?  Constantly changing PSLTSCALE and LTSCALE is not a feasible option.
« Last Edit: November 19, 2006, 10:25:50 AM by sinc »

Dinosaur

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #1 on: November 19, 2006, 11:25:18 AM »
If I have only one drawing scale in use I set the LTScale to the drawing scale, set all the viewports to PSLTScales to 0 and edit either in the model or through the viewport.  I am not seeing the program changing the LTScale  or PSLTScales on its own.  Once the values are set, they seem to stay.  All NEW viewports do want to default to PSLTScale 1 on creation since at least 2006 and I have noticed that each viewport must be changed individually.  If there a multiple scales in a drawing, the only alternative is to have the "1" and "1" settings and edit through a viewport instead of in the model.  I am warming up to the maximize viewport feature although it is annoying when the C3D labels and the visual for the ltscale change when there is an update.

sinc

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #2 on: November 19, 2006, 12:00:20 PM »
We can live with this one.  It just falls into that category of "You mean Autodesk hasn't fixed that YET?"    :ugly:

Dinosaur

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #3 on: November 19, 2006, 12:22:12 PM »
It makes me yearn for r13.  I had the problem solved with a paperspace viewport reserved exclusively for editing.  There was on option in the linetype portion of the options pulldown that would preserve the correct display in any scale viewport as well as the model.  This loss of this is likely the number 3 reason for my hatred of LDT behind labels that insisted on being displayed upsidedown in unfortunately twisted viewports and arc labels that could not be rotated along the curve to avoid interfering labels

sinc

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #4 on: November 19, 2006, 06:54:40 PM »
This loss of this is likely the number 3 reason for my hatred of LDT behind labels that insisted on being displayed upsidedown in unfortunately twisted viewports

You can actually get around that issue, with the North Rotation feature.

As for the arc labels that don't move, I haven't found any way around those.  Text mask doesn't work on them, either.  They're a pain.  One I'll be glad to forget about...   :-)

Cannon

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #5 on: November 19, 2006, 07:28:00 PM »
Sinc, with your LSP knowledge, why haven't you written something that pushes LTSCALE to the DIMSCALE when in MS, to 1 when in PS? We had one for the past 5 years just to avoid the issue. It's like a 5 minute programming exercise for someone like you, and will make life better for all involved.

I think I have mine (in VBA, not nearly as elegant as the LSP solution I saw but it's what I know,) if someone really wants it.

sinc

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #6 on: November 19, 2006, 07:41:05 PM »
Sinc, with your LSP knowledge, why haven't you written something that pushes LTSCALE to the DIMSCALE when in MS, to 1 when in PS? We had one for the past 5 years just to avoid the issue. It's like a 5 minute programming exercise for someone like you, and will make life better for all involved.

I think I have mine (in VBA, not nearly as elegant as the LSP solution I saw but it's what I know,) if someone really wants it.

I suppose you're right.  Although if you've already done it, it would save me needing to work through the details... (hint  ^-^)

Although I might also want to do it myself in Lisp.  I think I know how to go about it, with reactors, but haven't actually written any Lisp reactors yet...  It would be a good exercise.

Kind of begs to wonder though, if the fix is so easy, why hasn't Autodesk fixed it yet, after all these years?   :?

sinc

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #7 on: November 19, 2006, 09:13:09 PM »
Sinc, with your LSP knowledge, why haven't you written something that pushes LTSCALE to the DIMSCALE when in MS, to 1 when in PS? We had one for the past 5 years just to avoid the issue. It's like a 5 minute programming exercise for someone like you, and will make life better for all involved.

OK, I went ahead and took the challenge...   :-D

Since I had to figure out how to work reactors, it actually took me over an hour, but I think I came up with something that works:
Code: [Select]
(vl-load-com)

(defun ltscale:LayoutSwitched (reactor layout / doc dimscale tilemode)
  (setq AcadObj     (vlax-get-acad-object)
        doc         (vla-get-activedocument AcadObj)
        dimscale    (vlax-invoke doc "getvariable" "dimscale")
        tilemode    (vlax-invoke doc "getvariable" "tilemode")
  )
  (cond
    ((= tilemode 0) ; paperspace
     (vla-setVariable doc "ltscale" 1)
     (vla-setVariable doc "psltscale" 1)
     (vla-regen doc 1)
    )
    ((= tilemode 1) ; modelspace
     (vla-setVariable doc "ltscale" dimscale)
     (vla-setVariable doc "psltscale" 0)
     (vla-regen doc 0)
    )
  )
  (if doc (vlax-release-object doc))
  (if AcadObj (vlax-release-object AcadObj))
)

(if (/= (type *switchViewportReactor*) 'VLR-Miscellaneous-Reactor)
  (setq *switchViewportReactor*
         (VLR-Miscellaneous-Reactor
           nil ; No data is associated with the reactor callbacks
           '
           ((:VLR-layoutSwitched . ltscale:LayoutSwitched))
         ) ;_ end of vlr-miscellaneous-reactor
  )
)
(if (not (vlr-added-p *switchViewportReactor*))
  (vlr-add *switchViewportReactor*)
)
(princ "FixLTScale.lsp Loaded.\n")

...I went back and added the releases that probably aren't necessary, but it's a good habit to always use them...
« Last Edit: November 19, 2006, 09:51:29 PM by sinc »

MMccall

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #8 on: November 20, 2006, 04:24:02 PM »
for what it's worth ....

   After I get some basic linework in my project, enough to get an idea of size and potential sheet layouts,  I set by LTscale to the drawing scale I plan on using, PSLTscale to 0, setup the viewports with 'Align space', set the USC to 'view, and Dimscale to 0.   I do most of my work through the viewport into model.  Occasionally I'll enlarge the vp to work on something outside the current port.
« Last Edit: November 20, 2006, 09:14:46 PM by MMccall »

sinc

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #9 on: November 20, 2006, 07:44:35 PM »
for what it's worth ....

   After I get some basic linework in my project, enough to get an idea of size and potential sheet layouts,  I set by LTscale to the drawing scale I plan on using, PSLTscale to 0, setup the viewports with 'Alignment space', set the USC to 'view, and Dimscale to 0.   I do most of my work through the viewport into model.  Occasionally I'll enlarge the vp to work on something outside the current port.

Yeah, that's a pretty typical way to work with Vanilla Autocad, at least when all your viewports are at the same drawing scale.  Do you use any sort of vertical?

Land Desktop is a bit more confusing.  The whole idea of using DIMSCALE=0 and placing labels in modelspace tends to fall apart - or at least, you have to fight Land Desktop to do it.  And you STILL have issues.  Land Desktop has a North Rotation option to sort-of deal with this problem (it's messy, but at least it's a way to get everything working without constantly fighting the software).

C3D is completely different still.  For the most part, it doesn't use the old-style stuff at all.  Old dimensions and labels are gone, replaced by new "smarter" objects, that are maybe sometimes a bit too smart... (or maybe not smart enough...)  This has gotten rid of many of the problems that plagued Land Desktop, but a few remain.  The little Lisp routine I posted uses reactors to fix an issue Autodesk has so-far failed to fix, and makes C3D work a bit more-smoothly...

MMccall

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #10 on: November 20, 2006, 10:00:01 PM »
My Autocad experience is only with the Civil 3D variety.  Started with 2005.  Currently using 2006 sp2. Until recently, 2007 seemed too disruptive to implement.

I've never had the pleasure of using land desktop. :-P

While the C3d objects are very nice and functional, I still need a bunch of the basic stuff to complete a plan set.  I look for the simplest and most adaptable solutions.

Dinosaur

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #11 on: November 20, 2006, 11:00:16 PM »
I will tell you a secret, MMccall . . . I use a lot of AutoCAD primitives in my drawings as well.  The eventual ideal is a file with nothing but Civil 3D objects and a title block if we must, but that ideal has not yet matured and I likely would not use it at any rate.  As I finish more pressing battles, I will use that time to bring more of the standard output into my requirements, but I am content with how I am using it at present.  My point is, there is nothing wrong in using the elements of Civil 3D that give you the results you want and ignore those features you are not ready to use.

b_hailey

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #12 on: December 08, 2006, 02:56:34 PM »
I have a great routine that I wrote that changes your ltscale and psltscale depending on if you are in model space or paper space.  It's attached if anyone wants it.

Dinosaur

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #13 on: December 11, 2006, 08:50:03 AM »
Thank you for making that available.  I am wondering if there is a way to do this without tying it to a dimscale.  I have drawings that contain multiple viewports of different scales and also many dimensions are in paper space, hence it is quite likely the current dimscale will not be the LTScale I need.

sinc

  • Guest
Re: ( C3D ) Linetypes in Model Space?
« Reply #14 on: December 11, 2006, 10:08:30 AM »
Thank you for making that available.  I am wondering if there is a way to do this without tying it to a dimscale.  I have drawings that contain multiple viewports of different scales and also many dimensions are in paper space, hence it is quite likely the current dimscale will not be the LTScale I need.

It would be very simple to tie it to some generic data bit that gets stored in the drawing, like in a generic dictionary.

It should also be possible to tie it directly to the Drawing Scale, but I'm not entirely sure how to access that...  The Civil-3D Automation documentation basically sucks right now.