Originally Posted by
Opie
It appears you are using a vertical (probably Civil 3D) to AutoCAD. In the Drawing Settings, which can be found by a right-click on the drawing name on the Settings tab of the ToolSpace palette, there is a tab labeled Object Layers. This may do what you are wanting to do.
Hi Opie, this does indeed look like an area you can change the default values. The question I have is how do I translate that into either a LISP or dot net code to do it automatically? I thought LISP couldn't handle this type of stuff, but maybe I'm wrong?
We have four different label styles
Distance Only
Bearing + Distance
Bearing + Distance (stacked)
Curve Labels
We then assign them to their respective layer. These bearings/distances are used for lot lines, plat boundaries, and easements so the end goal is to be able to run a command, say ED (Easement- Distance only), and start clicking away at all the easement lines and it will assign the label to the easement layer, and use the easement distance style. Then I may need to do the boundary so I do something like BBDS (Boundary Bearing Distance Stacked) and it sets it to the Boundary layer, and uses the Boundary Bearing/Distance stacked label style. I just hate having to go in and manually update the current label style and layer when I'm dimensioning different things, and on top of that it's easy to miss layers so removing that error is preferred. I prefer automation for this type of stuff when I can.
Originally Posted by
BlackBox
Yes; it is my understanding, and I could be mistaken, that the OP wants a LISP routine to [implicitly] store the current settings (Object Layer, and Default Style), set the new settings, allow the Objects to be placed accordingly, and then restore same - just as we would with say Dimensions, or MLeaders, etc.
Do you happen to already have something in your toolbox for such? If not, I can help out after some project submittals.
Cheers
Hi Blackbox,
I believe you're wondering if I have something like this?
Code:
(DEFUN C:EAD()
(setq cancel *error*)
(setq *error* trapdim)
(setq oldlayer (getvar "clayer"))
(initget "E P")
(setq GET1 (getkword "[Existing/Proposed] <Proposed>"))
(COND
((= GET1 "E") (COMMAND "-LAYER" "MAKE" "SE-EASE-TXT" "COLOR" "7" "" ""))
(T(COMMAND "-LAYER" "MAKE" "SP-EASE-TXT" "COLOR" "2" "" ""))
)
(COMMAND "DIMALIGNED" "nea" PAUSE "per")
(setvar "clayer" oldlayer)
(princ)
)
I use this one for easement dimensions. If LISP can tackle this that's great, I was just under the impression it couldn't. I know the command for adding a single segment is "AeccAddSegmentLabel", but I didn't know how to go further from there with telling it to use certain styles.
Thanks!