Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
petd
Posts: 159
Registered: ‎07-16-2003
Message 1 of 4 (546 Views)

How to change the extrusion direction

546 Views, 3 Replies
06-15-2003 10:33 PM
Hi,

I like to change the Z= propertie form lines and arcs (that are from a exploded solids from

a 3d solid) extrusion direction relative to UCS:

X= 0.0000 Y= 0.0000 Z= -1.0000



Propertie box: Geometry: Normal Z= -1.0000



Explanation in the autocad help:

Reports the X,Y,Z values of the normal direction vector relative to the WCS
This property specifies a vector, not a location in space



The Z-value should be 1



Peter D
*Propst, Mark
Message 2 of 4 (546 Views)

Re: How to change the extrusion direction

06-15-2003 11:22 PM in reply to: petd
one way...

(DEFUN CHANGEZ()
(SETQ ENT(CAR(ENTSEL"\nPick"))
elst(entget ent)
extr(cdr(assoc 210 elst)) ; get the existing extrusion direction
)
;modify the z as needed
;just for example I made the z -1 since the line I selected started out with
1
(setq newextr(list (car extr)(cadr extr) -1))
;you would reverse that for your needs or whatever other adjustments you
wanted to do

;rewrite the entity list with new extrusion direction
(setq elst
(subst (cons 210 newextr)
(assoc 210 elst)
Elst
)
)
;update database
(entmod elst)
)

hth
Mark

"petd" wrote in message news:f16e2e1.-1@WebX.maYIadrTaRb...
> Hi,
> I like to change the Z= propertie form lines and arcs (that are from a
exploded solids from
> a 3d solid) extrusion direction relative to UCS:
> X= 0.0000 Y= 0.0000 Z= -1.0000
>
> Propertie box: Geometry: Normal Z= -1.0000
>
> Explanation in the autocad help:
> Reports the X,Y,Z values of the normal direction vector relative to the
WCS
> This property specifies a vector, not a location in space
>
> The Z-value should be 1
>
> Peter D
>
>
*Propst, Mark
Message 3 of 4 (546 Views)

Re:

06-15-2003 11:54 PM in reply to: petd
or possibly you might want to do...

(setq newextr(list (car extr)(cadr extr) (abs(caddr extr))))

in lieu of the line below
> (setq newextr(list (car extr)(cadr extr) -1))


"Mark Propst" wrote in message
news:A3FC2498E496F8883C3922A075A9BD0F@in.WebX.maYIadrTaRb...
> one way...
>
Distinguished Contributor
petd
Posts: 159
Registered: ‎07-16-2003
Message 4 of 4 (546 Views)

Re:

06-16-2003 05:06 PM in reply to: petd
Mark,

You already helped me a lot, but i still have a little problem with the coördinates, after running the routine the changed entities goes to other coordinates, i tried to resolve the problem with trans the coördinates but this wont help (note: i made the drawing in world coördinates).


Peter D.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community