Hi All
I cave created a new drop down menu using the Customize User Interface in AutoCad 2011 called Load Aerial Photography with a sub menu called Insert Tiles.
When selecting my new menu I would like to have a lisp / macro that browses to where our JPEG Aerial Photos are kept on out network.
At the moment I have to select the AutoCad pull down:-
Insert, Raster Image Referance then browse to M:\DATA\AERIAL_PHOTOS\2012\84235\RGB_10cm_1km_Jpeg_Tiles
If there is a user on this Forum who can build a lisp / Macro that will browse to the above filepath I would be very grateful as I'm really getting nowhere with this.
Thanks
Paul
FYI (for future reference), there is a specific forum for this type of question:
http://forums.autodesk.com/t5/AutoCAD-Customization/ct-p/AutoCADTopic1
However, this sounds like a job for Design Center.
There is a fairly simple way to open Design Center to a specific folder. You could place this line of code in a button macro (modify the path as necessary):
(command "._adcnavigate" "M:\DATA\AERIAL_PHOTOS\2012\84235\RGB_10cm_1km_Jpeg_Tiles")
If the contents of the folder are static, a Tool Palette might work, too.
Edit:
P.S. You will have to replace backslashes (\) with foreslashes (/) in any paths.
Nice.
@dmfrazier wrote:
Edit:
P.S. You will have to replace backslashes (\) with foreslashes (/) in any paths.
Does not the quotes in the Macro preclude the need to change the slashes?
Regards, Charles Shade
CSHADEDESIGN | AUTOCAD LT | LT-KB | DYNAMIC BLOCKS
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
Man; you're gonna make me learn to fish?
Regards, Charles Shade
CSHADEDESIGN | AUTOCAD LT | LT-KB | DYNAMIC BLOCKS
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
You didn't get that "expert elite" by taking hand-outs, did you?
I save the give-aways for the truly needy.
I've stuck to foreslashes and no quotes. Makes the Macro cleaner and easier to read.
Regards, Charles Shade
CSHADEDESIGN | AUTOCAD LT | LT-KB | DYNAMIC BLOCKS
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
"foreslashes and no quotes"
The macro I posted was LISP code, so the quotes are necessary. The foreslashes can also be double backslashes.
@dmfrazier wrote:
"foreslashes and no quotes"
The macro I posted was LISP code, so the quotes are necessary. The foreslashes can also be double backslashes.
See now that I did not know.
I'm an LT user and do not have experience with Lisp. Is there something here that makes this Lisp code and not a Macro as was stated? To my ignorant eye it looks like a button Macro.
Regards, Charles Shade
CSHADEDESIGN | AUTOCAD LT | LT-KB | DYNAMIC BLOCKS
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
"I'm an LT user and do not have experience with Lisp."
Yes, I sensed that.
"Is there something here that makes this Lisp code and not a Macro as was stated? To my ignorant eye it looks like a button Macro."
What makes it LISP code is the fact it is enclosed in parentheses. If you tried to run (in LT) the code I posted, you'd get an error. Non-LT AutoCAD interprets anything inside parentheses as LISP. This particular line of LISP code is very similar to what you think of as "macro" syntax, but LISP uses different conventions. In a sense, LISP is just another "macro" language.
It's only a "button macro" if you use it to define a toolbar button. This code can also be run at the command line, or it could be defined as a named function and run within a larger LISP routine, or loaded and run as a "command".
I'm not to sure myself but seems to work fine, as you can see from the attached where the Macro field is highlighted blue you can see the command.