Message 1 of 3
Leader line

Not applicable
03-29-2000
09:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the "migration" from r14 to R2000 I have come across some frustrating
items that are seemingly not explanable.
Here is one of them. I have had a "curved" leader line routine for many
years (Rel10 I think).
For some reason it done not do all that it is supposed to.
What it does not do is the "pedit" of the leader line into a splined pline.
Below is the code.
(defun C:LEA (/ osm scale wide spt ept1 ept2 npt n_layer x_layer)
(setq osm (getvar "osmode"))
(setvar "osmode" 0)
(setvar "cmdecho" 0)
(setq scale (gscale)) ;gscale is a function to retrieve
current scale factor
(setq wide (* 0.05 scale)
long (* 0.125 scale)
spt (getpoint "\nStart of arrowhead: ")
ept1 (getpoint spt "\nAngle of arrowhead: ")
ept2 (polar spt (angle spt ept1) long)
npt (polar ept2 (angle spt ept1) long)
)
(command ".pline" spt "w" 0 wide ept2 "w" 0 0 "")
(setq n_layer (strcat (getvar "USERS1") "txt")) ;This part
of the routine will
(setq x_layer (tblsearch "layer" n_layer)) ;change
the arrowhead to the
(if x_layer
;current discipline "text"
(command ".chprop" spt "" "la" n_layer "c" "1" "") ;layer
)
(command ".pline" ept2 npt)
(while
(type (setq npt (getpoint npt "\nNext point: ")) 'LIST)
(command npt)
)
(command "")
(command ".pedit" "l" "s" "")
(if x_layer
;As above, changes leader line
(command ".chprop" ept2 "" "la" n_layer "c" "1" "") ;to current
"text" layer.
)
(setvar "osmode" osm)
(princ)
)
In advance, thanks for the help..
items that are seemingly not explanable.
Here is one of them. I have had a "curved" leader line routine for many
years (Rel10 I think).
For some reason it done not do all that it is supposed to.
What it does not do is the "pedit" of the leader line into a splined pline.
Below is the code.
(defun C:LEA (/ osm scale wide spt ept1 ept2 npt n_layer x_layer)
(setq osm (getvar "osmode"))
(setvar "osmode" 0)
(setvar "cmdecho" 0)
(setq scale (gscale)) ;gscale is a function to retrieve
current scale factor
(setq wide (* 0.05 scale)
long (* 0.125 scale)
spt (getpoint "\nStart of arrowhead: ")
ept1 (getpoint spt "\nAngle of arrowhead: ")
ept2 (polar spt (angle spt ept1) long)
npt (polar ept2 (angle spt ept1) long)
)
(command ".pline" spt "w" 0 wide ept2 "w" 0 0 "")
(setq n_layer (strcat (getvar "USERS1") "txt")) ;This part
of the routine will
(setq x_layer (tblsearch "layer" n_layer)) ;change
the arrowhead to the
(if x_layer
;current discipline "text"
(command ".chprop" spt "" "la" n_layer "c" "1" "") ;layer
)
(command ".pline" ept2 npt)
(while
(type (setq npt (getpoint npt "\nNext point: ")) 'LIST)
(command npt)
)
(command "")
(command ".pedit" "l" "s" "")
(if x_layer
;As above, changes leader line
(command ".chprop" ept2 "" "la" n_layer "c" "1" "") ;to current
"text" layer.
)
(setvar "osmode" osm)
(princ)
)
In advance, thanks for the help..