AutoCAD Land Desktop (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

North Arrow and North Rotation lisp

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
2286 Views, 5 Replies

North Arrow and North Rotation lisp

My company uses a custom north arrow. I have been trying to write a lisp to insert a north arrow with the correct north rotation. I can't use LDD because of the attributes. I am kind of new to lisp routines. Any help would be appreciated
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Hi,

As you have little knowledge of Lisp you will find it far easier to write a
program of this nature with VBA than Lisp.

However, LDD has tools to correctly insert a North Arrow allowing for North
Rotation and you would get the most return for your time simply by setting
your North Arrow up in the same way.


--

Laurie Comerford
CADApps
www.cadapps.com.au
www.civil3Dtools.com
wrote in message news:5611735@discussion.autodesk.com...
My company uses a custom north arrow. I have been trying to write a lisp to
insert a north arrow with the correct north rotation. I can't use LDD
because of the attributes. I am kind of new to lisp routines. Any help would
be appreciated
Message 3 of 6
Anonymous
in reply to: Anonymous

I wrote this lisp to align my north arrow based on viewport dview. It might be a good start.

(defun c:rn()
(setq tw(entget(car(entsel"\nSelect a Viewport:"))))
(setq new (cdr (assoc 0 tw)))
(cond
((= new "VIEWPORT")(setq rt(cdr(assoc 51 tw))))
((= new "LWPOLYLINE")(setq temp (entget(cdr (assoc 330 tw))))(setq rt(cdr(assoc 51 temp))))
)
(setq en(car(entsel"\nSelect North Arrow (must be inserted vertically:)")))
(setq elist(entget en))
(setq elist(subst (cons 50 rt)(assoc 50 elist) elist))
(entmod elist)
(princ)
)
Message 4 of 6
Anonymous
in reply to: Anonymous

thanks for the help
Message 5 of 6
Anonymous
in reply to: Anonymous

Or you can do some thing has simple as going into your view port and setting it tho world. Then insert your north arrow. Now if you view is twisted. and you unlock you view change your ucs to word it will also show yout tru north. Hope that help. Why use 100% when you can get by with 50%.......................LOL
Message 6 of 6
Anonymous
in reply to: Anonymous

Everytime I try to input the code into the command line it does not seem to do anything. Could I possibly be doing something wrong. I thank you in advance for your help.

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

Post to forums  

Autodesk Design & Make Report