AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
Member
toonook77777
Posts: 4
Registered: ‎10-15-2012
Message 1 of 8 (270 Views)

rt lisp routine

270 Views, 7 Replies
10-22-2012 12:43 PM

when I load a lisp routine "rt".... it wipes my osnap settings.

 

??

 

 

*Expert Elite*
neilyj
Posts: 3,756
Registered: ‎08-01-2008
Message 2 of 8 (252 Views)

Re: rt lisp routine

10-22-2012 01:39 PM in reply to: toonook77777

It's the (SETVAR "OSMODE" 1) that is doing this (resets to endpoint, presumably as part of the lisp routine). I don't know what the lisp is doing (rotating a view perhaps??) as I'm not a lisp expert - there are other contributors to the forum who are and may be able to suggest something.

 

As an aside, I have put my preferred OSNAPS in a right click macro so i can always reset if i need to temporarily alter them.

 

 

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 240Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
Member
toonook77777
Posts: 4
Registered: ‎10-15-2012
Message 3 of 8 (245 Views)

Re: rt lisp routine

10-22-2012 01:44 PM in reply to: neilyj

so OSMODE 1 is what is killing my osnaps? What should it be set to to prevent this?

 

*Expert Elite*
AllenJessup
Posts: 5,872
Registered: ‎05-21-2003
Message 4 of 8 (242 Views)

Re: rt lisp routine

10-22-2012 01:56 PM in reply to: toonook77777

I don't have time now. But if no one has chimed in on how to use GETVAR to save the OSMode. I'll get back to you in the morning.

 

Allen

*Expert Elite*
neilyj
Posts: 3,756
Registered: ‎08-01-2008
Message 5 of 8 (238 Views)

Re: rt lisp routine

10-22-2012 02:31 PM in reply to: toonook77777
i guess you could reset the osmode at the end of the lisp. Allen is one of the lisp gurus i mentioned so will give better advice than me. you will need to obtain the osmode value that corresponds to your preferred settings. Set them via options as usual and type OSMODE and note the value displayed (help will explain how the value is derived)
neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 240Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
*Expert Elite*
AllenJessup
Posts: 5,872
Registered: ‎05-21-2003
Message 6 of 8 (205 Views)

Re: rt lisp routine

10-23-2012 04:50 AM in reply to: toonook77777

OK. Since you probably don't write much lisp. The easiest way to fix this would be to add 2 lines to the lisp code. Add the bold line where shown.

 

C:RT ()

(setvar "cmdecho" 0)

(setq OM (getvar "osmode"))

(setq OB (entsel "\Select object for base angle: "))

 

Add this line near the end of the lisp.

 

(setvar "osmode" OM)

 

The first line sets the current osmode to the variable OM. The second line resets the osmode using the OM variable.

 

Allen

*Expert Elite*
AllenJessup
Posts: 5,872
Registered: ‎05-21-2003
Message 7 of 8 (203 Views)

Re: rt lisp routine

10-23-2012 04:55 AM in reply to: neilyj

neilyj wrote:
Allen is one of the lisp gurus i mentioned

Sorry to dissuade you Neil. But I'm just a dabbler. I stopped doing anything serious in lisp when autodesk and third party covered most of what I wanted to do. The only things I can do in VLisp is to paste together some things by example.

Allen

*Expert Elite*
neilyj
Posts: 3,756
Registered: ‎08-01-2008
Message 8 of 8 (195 Views)

Re: rt lisp routine

10-23-2012 05:29 AM in reply to: AllenJessup

If you can anything in lisp - you are a guru...:smileywink:

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 240Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
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 or visit the Installation and Licensing Forum to get help installing your software.