Author Topic: Line weights converting wrong in 2010  (Read 2062 times)

0 Members and 1 Guest are viewing this topic.

KewlToyZ

  • Guest
Line weights converting wrong in 2010
« on: September 14, 2009, 11:55:09 AM »
I am using the dynamic layer creation tool from here:
http://www.theswamp.org/index.php?topic=8763.0;all

Any way, I was trying to track down the variable for line weight unit conversion, metric or imperial.
It seems my defaults are imperial and the metric units in the layer routines are coming in completely wrong now?

Say for instance:
(list "G-ANNO-TEXT"               "CONTINUOUS"      7        25 "General: Annotation Text" :vlax-true)

Is creating a linewieght of 0.083"  ???

Any thoughts what it could be?

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #1 on: September 14, 2009, 01:01:25 PM »
ummm probably should just switch LWUNITS back to Millimeters....  :lmao: :ugly:

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #2 on: September 14, 2009, 01:07:47 PM »
Still can't figure out why the layer creation takes so long initializing in 2010.
No errors, just nails the processor pretty hard and sits for 5+ seconds.
Looking through sysvars some more.....

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #3 on: September 14, 2009, 01:25:27 PM »
Its the modeless layer manager being open!!!!
Now just to find the tweaks to detect and close before use.....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Line weights converting wrong in 2010
« Reply #4 on: September 14, 2009, 01:32:35 PM »
Talking to yourself again? :evil:
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #5 on: September 14, 2009, 01:34:57 PM »
Only bad when I am losing the argument  :lmao:

Unfortunately LAYERPALETTE doesn't indicate, it just seems to toggle???

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #6 on: September 14, 2009, 01:38:30 PM »
Found it, LAYERMANAGERSTATE...

(command "LAYERMANAGERSTATE" 0)
unfortunately it is read only....
« Last Edit: September 14, 2009, 01:42:37 PM by KewlToyZ »

CHulse

  • Swamp Rat
  • Posts: 504
Re: Line weights converting wrong in 2010
« Reply #7 on: September 14, 2009, 01:45:19 PM »
LAYERDLGMODE is (I think) what switches between modeless and old layer manager...

...if that helps any...
« Last Edit: September 14, 2009, 01:56:35 PM by CHulse »
Cary Hulse
Urban Forestry Manager
Wetland Studies and Solutions

Civil 3D 2020 & 2023

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #8 on: September 14, 2009, 01:49:56 PM »
Yeah but it doesnt just turn it off to help performance.
I'm not looking to convert back to the old layer manager, just turn it off for people when running some routines.
Most prefer the Modeless Layer Manager.
They just leave it running too often and complain about performance.
I figured I would close it in key routines, but it just hangs on the read only prompt for a spell.
Can I bypass it with vla?

Crank

  • Water Moccasin
  • Posts: 1503
Re: Line weights converting wrong in 2010
« Reply #9 on: September 14, 2009, 01:57:46 PM »
You can use the command LAYERCLOSE to close the layerpalette, but if it was on you should turn it back on again.

I wonder how to detect if the layerpalette is on...  :|
Vault Professional 2023     +     AEC Collection

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #10 on: September 14, 2009, 01:59:51 PM »
LAYERMANAGERSTATE = 1 it is open
Thanks for the info  ^-^

LAYERCLOSE works fine from the command line, but again, the routine hangs.
Scratching my head to get around this one.
« Last Edit: September 14, 2009, 02:03:05 PM by KewlToyZ »

Crank

  • Water Moccasin
  • Posts: 1503
Re: Line weights converting wrong in 2010
« Reply #11 on: September 14, 2009, 02:50:25 PM »
Code: [Select]
(defun c:foo ( / lms ce)
(setq ce (getvar "CMDECHO"))(setvar "CMDECHO" 0)
(command ".undo" "_begin")
(setq lms (getvar "LAYERMANAGERSTATE"))
(command ".LAYERCLOSE")

; do your stuff

(if (not (zerop lms))(command ".layerpalette"))
(command ".undo" "_end")
(setvar "CMDECHO" ce)
(princ)
)
Vault Professional 2023     +     AEC Collection

KewlToyZ

  • Guest
Re: Line weights converting wrong in 2010
« Reply #12 on: September 15, 2009, 08:19:41 AM »
Thanks Crank,
I'm trying to look the vla structure for it.
The routine I have is vla and firing before the layerclose command when the layerclose is the first item in the routine so it still hangs.
Likely a matter of proper structuring for it as well though.
I'll keep you guys informed where I get with it.
Checking out service pack 1 this morning for MEP 2010.