+ Reply to Thread
Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 49
  1. #1
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Oct 2013
    Posts
    19

    Smile Help needed with a Macro please

    Registered forum members do not see this ad.

    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 macro that browses to where our JPEG Aerial Photos are kept on our 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 put together a Macro that will browse to the above filepath I would be very grateful as I'm really getting nowhere with this.

    Thanks

    Paul

  2. #2
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,375

    Default

    Is it possible that the slashes have to go the other way? Like this: / instead of like this \.

    According to a reference book I have the "/" character is used to define directories. Ex. - C:/0000/bolt.dwg
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  3. #3
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Oct 2013
    Posts
    19

    Default

    Quote Originally Posted by ReMark View Post
    Is it possible that the slashes have to go the other way? Like this: / instead of like this \.
    The example I have given Isnt my attempt at writing the Macro its the long handed way of inserting a raster image into a drawing, what I need is someone with Macro experiance to put together a piece of Macro code that will look to the file path I have provided, hope that makes sense.

  4. #4
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,375

    Default

    You are writing a path to a directory. Reverse the slash.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  5. #5
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Oct 2013
    Posts
    19

    Default

    Quote Originally Posted by ReMark View Post
    You are writing a path to a directory. Reverse the slash.
    Thats the point i'm not writing anything as I don't have the experiance to write Macros, if you look at a macro it has instructins like (defun c:/ (((****)) etc

  6. #6
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,375

    Default

    If you are looking at something like this...

    (defun c:addtxt ( / i n r s )

    ...then aren't you using a lisp routine not a macro?
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  7. #7
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,375

    Default

    Here is an example of a complex macro (courtesy of CADTech Seminars).

    ^C^C_-layer;make;TAGS;color;red;;;_-insert;c:/blocks/tag.dwg;\96;96;;\_insert;c:/blocks/scale96.dwg;$m=$(getvar,lastpoint);96;96;;_pline;$m=$(getvar,lastpoint);w;1;;\;_insert;c:/block/tag2.dwg;end;\96;96;;\\plinewid;0;
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  8. #8
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Oct 2013
    Posts
    19

    Default

    Quote Originally Posted by ReMark View Post
    If you are looking at something like this...

    (defun c:addtxt ( / i n r s )

    ...then aren't you using a lisp routine not a macro?
    This is c copy from my CUI where it says Macro in the properties box (if c:a4comm nil (load "c:/data/lisp/a4comm"));a4comm;

  9. #9
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,375

    Default

    That macro is calling a lisp routine. Do you know what a lisp routine is?
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  10. #10
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Oct 2013
    Posts
    19

    Default

    Registered forum members do not see this ad.

    Would you know how to put a Macro together that allow my to insert my JPEG using Insert, Raster Image Referance M:\DATA\AERIAL_PHOTOS\2012\84235\RGB_10cm_1km_Jpeg _Tiles?

Similar Threads

  1. SELECT in macro won't stay selected!!!! How to hide Macro in command line aswell?
    By jamesfear in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 11
    Last Post: 31st Jul 2012, 02:23 am
  2. help needed C3D
    By matt sad in forum AutoCAD 3D Modelling & Rendering
    Replies: 7
    Last Post: 29th Aug 2011, 12:29 pm
  3. Help needed please
    By Corner Post in forum AutoCAD Beginners' Area
    Replies: 17
    Last Post: 15th Feb 2007, 06:57 am
  4. some help needed
    By Rebbeca in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 22nd Nov 2006, 06:27 pm
  5. 3d Solid Rotation VBA Macro Needed
    By handyandy in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 9th Apr 2006, 10:52 pm

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts