Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
Anonymous
448 Views, 1 Reply

vla-GetWidth

Hello,

I want to get the StartWidth and the EndWidth of Polyline segments.
I solved it in this way:

(setq vlaTyp (vla-Get-ObjectName (vlax-ename->vla-object obj)))
(cond
((= vlaTyp "AcDbPolyline") (setq vlaTyp 0))
((= vlaTyp "AcDb2dPolyline") (setq vlaTyp 1)) ;; what type
of polyline
((= vlaTyp "AcDb3dPolyline") (setq vlaTyp 2))
); cond
(cond
((= vlaTyp 0) (vla-getWidth vlaObj id 'ab 'eb)) ;; LWPolyline
((and (= vlaTyp 1)
(< (vla-get-Type vlaObj) 2)
); and
(vla-getWidth vlaObj id 'ab 'eb)) ;;
non-splined 2D-Polyline
(T (setq ab 0.0 eb 0.0)) ;;
all other
);cond

Unfortunately, it only works with LWPolyline. What do I have to change, that
it would also work with non-splined 2D-Polylines?

Thanks for helping!
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

I can't seem to get the ActiveX method "GetWidth" to return anything for
2DPolylines. Guess it's back to the old ways... (entnext)

--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juhden@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332


"Fred Tomke" wrote in message
news:07E3A579443F3D6D0D39350E5CBD86C2@in.WebX.maYIadrTaRb...
> Hello,
>
> I want to get the StartWidth and the EndWidth of Polyline segments.
> I solved it in this way:
>
> (setq vlaTyp (vla-Get-ObjectName (vlax-ename->vla-object obj)))
> (cond
> ((= vlaTyp "AcDbPolyline") (setq vlaTyp 0))
> ((= vlaTyp "AcDb2dPolyline") (setq vlaTyp 1)) ;; what
type
> of polyline
> ((= vlaTyp "AcDb3dPolyline") (setq vlaTyp 2))
> ); cond
> (cond
> ((= vlaTyp 0) (vla-getWidth vlaObj id 'ab 'eb)) ;;
LWPolyline
> ((and (= vlaTyp 1)
> (< (vla-get-Type vlaObj) 2)
> ); and
> (vla-getWidth vlaObj id 'ab 'eb)) ;;
> non-splined 2D-Polyline
> (T (setq ab 0.0 eb 0.0))
;;
> all other
> );cond
>
> Unfortunately, it only works with LWPolyline. What do I have to change,
that
> it would also work with non-splined 2D-Polylines?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost