Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fix north arrow

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
htls69
1016 Views, 9 Replies

fix north arrow

i need help making my north arrow rotate with the viewport if anyone can help me that would be awesome

Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
9 REPLIES 9
Message 2 of 10
jmartt
in reply to: htls69

I've made a button that uses this LISP file.

I didn't write this. It was probably Sam Lucido.

 

(defun c:rn()
  (setq tw(entget(car(entsel" Select 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" Select North Arrow: ")))
  (setq elist(entget en))
  (setq elist(subst (cons 50 rt)(assoc 50 elist) elist))
  (entmod elist)
  (princ)
)

Message 3 of 10
augusto.goncalves
in reply to: htls69

Can you provide more details on your request? It seems that you have a custom arrow (not a built in), am I right?

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 4 of 10
htls69
in reply to: augusto.goncalves

yes I have a custom arrow that I brought in to one of the existing arrows so that I could adjust it and change it but now it will not rotate with the viewport so I was hoping that somebody might be able to make it rotate with the association to the viewport
Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
Message 5 of 10
augusto.goncalves
in reply to: htls69

To keep an AutoCAD entity from rotating with the view, you'll need to override (in C++) or overrule (in .NET) the ViewportDraw behavior to maintain the entity position regarding the view direction.

 

There is a basic implementation for this in C++ at http://adndevblog.typepad.com/autocad/2012/06/how-to-control-an-entity-viewportdraw-so-that-it-alway...

 

Is that the direction that you need?

 

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 6 of 10
htls69
in reply to: augusto.goncalves

I just want it to work like the built in ones but with my north arrow
Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
Message 7 of 10
htls69
in reply to: htls69

Like one in the custom north arrows in the layout elements
Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
Message 8 of 10
augusto.goncalves
in reply to: htls69

The built-in AutoCAD arrow is not on the drawing, but a different type of image...

 

If you need yours on the drawing, then you need to manipulate it, at least that's my understanding...

 

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 9 of 10
htls69
in reply to: augusto.goncalves

yes i know i was trying to just edit one of the stock north arrows to make it work just like one of the built it arrows and could not get the block to associate the new north arrow that i put in the block to work like the built in one
Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
Message 10 of 10

I have modified the stock north arrows before and I will tell you they are setup with dynamic blocks and must contain the exact same parameters set in the stock ones with the exact same names. Open a stock one and get into the block editor on it to view the dynamic parameters. It can be done...


Steve Hill
Civil Designer / .NET Developer
AutoCAD Certified Professional
AutoCAD Civil 3D Certified Professional
http://redtransitconsultants.com/
Autodesk Exchange Store
Twitter | LinkedIn



Please select the Accept this solution button if my post solves your issue or answers your question.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report