+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Junior Member ALUX's Avatar
    Using
    AutoCAD 2013
    Join Date
    May 2012
    Posts
    15

    Default Custom macro help!

    Registered forum members do not see this ad.

    I'm trying to come up with a macro that will create a "solid" layer and move the current drawing to that layer. My macro already creates a solid layer, solprof, explode, overkill, purge, pedit and join, and toggles back to model layer. So we need to move the model first with very few characters (approaching the limit).

    This is what my macro looks like so far:

    ^C^C._SolProf;\;_N;_Y;_Y;;;^C^Cexplode;\^C^C-overkill;_ALL;;;^C^C-overkill;_ALL;;;^C^CPurge;_ALL;;_n;^C^Cpedit;_Mult iple;_ALL; _Y;_join;_Jointype;_both;0.001;^C^C^Csetvar;tilemo de;$M=$(!=,$(getvar,tilemode),1)

  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 4000, 2GB 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 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,144

    Default

    You should use the command line version of the Purge command and probably throw in an Audit to clean up any errors while you're at it.

    AutoCAD 2012? Why aren't you using the VIEWBASE command instead of SOLPROF to create your 2D geometry?
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

  3. #3
    Super Member
    Computer Details
    nestly's Computer Details
    Operating System:
    Windows XP Professional (32bit)
    Motherboard:
    Intel DG33FB
    CPU:
    Intel Core2 E2220 @ 2.4GHz
    RAM:
    4GB DDR2 6400
    Graphics:
    ATI Firepro 5800
    Primary Storage:
    250GB WD 7200rpm / 320GB WD 7200rpm
    Secondary Storage:
    500GB WD external USB
    Monitor:
    Samsung 26" @ 1920x1200 + LG 22" @ 1680x1050
    Using
    AutoCAD 2011
    Join Date
    Sep 2010
    Posts
    1,895

    Default

    ... does VIEWBASE actually create any geometry that can be moved, copied, or shared between drawings? (rhetorical)

  4. #4
    Junior Member ALUX's Avatar
    Using
    AutoCAD 2013
    Join Date
    May 2012
    Posts
    15

    Default

    Version 2011. No VIEWBASE command. How do you move the part from layer 0 to the recently creates "solid" layer?

    ^C^C-layer;M;Solid;C;7;;;^C^C._SolProf;\;_N;_Y;_Y;;;^C^ Cexplode;\^C^C-overkill;_ALL;;;^C^C-overkill;_ALL;;;^C^C-Purge;_ALL;;_n;^C^Cpedit;_Multiple;_ALL; _Y;_join;_Jointype;_both;0.001;^C^C^Csetvar;tilemo de;$M=$(!=,$(getvar,tilemode),1)

  5. #5
    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 4000, 2GB 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 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,144

    Default

    Your profile says AutoCAD 2012.

    When you purge you should do it twice. First time is just for Regapps. Second time is for All.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

  6. #6
    Super Member
    Computer Details
    nestly's Computer Details
    Operating System:
    Windows XP Professional (32bit)
    Motherboard:
    Intel DG33FB
    CPU:
    Intel Core2 E2220 @ 2.4GHz
    RAM:
    4GB DDR2 6400
    Graphics:
    ATI Firepro 5800
    Primary Storage:
    250GB WD 7200rpm / 320GB WD 7200rpm
    Secondary Storage:
    500GB WD external USB
    Monitor:
    Samsung 26" @ 1920x1200 + LG 22" @ 1680x1050
    Using
    AutoCAD 2011
    Join Date
    Sep 2010
    Posts
    1,895

    Default

    Quote Originally Posted by ALUX View Post
    Version 2011. No VIEWBASE command. How do you move the part from layer 0 to the recently creates "solid" layer?
    I'm not very familiar with Solprof, but I assume that it creates the block on the current layer, so how about setting your new layer current in the macro before executing Solprof?

  7. #7
    Forum Deity Dadgad's Avatar
    Using
    AutoCAD 2012
    Join Date
    Nov 2011
    Location
    At the confluence of worthlessness & invaluability
    Posts
    3,137

    Default

    Welcome to the forum.

    Solprof is a great command.
    It will create 2 blocks (unless you choose to not show hidden lines) which will be on their own separate layers.
    One of those will be prefixed with PV that will be your block containing all of the visible lines.
    The other new layer which will be created will be prefixed with PH and that block contains all of the hidden lines.
    I separate the 2 blocks by a known distance before exploding and overkilling them. At that point I select all of the HIDDEN lines and using my quick properties palette change their layer to STEEL HIDDEN, and their draw order to the back.
    Having done the same things to the VISIBLE lines, I then put them on the STEEL layer and set their draw order to front.
    I then reposition whichever of the blocks was moved away back the known distance so they are in the correct place.
    You can change the layers using LAYMRG if you want. If you do it that way the PV and PH layers will be deleted after their respective contents have been moved to the appropriate layers.

    FYI there is no need to run overkill 2 times, one will do it, and if you use the FUZZ VALUE of zero, the default, you will be fine..
    Volume and repetition do not validate opinions forged in the absence of thought.

  8. #8
    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 4000, 2GB 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 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,144

    Default

    Quote Originally Posted by nestly View Post
    ... does VIEWBASE actually create any geometry that can be moved, copied, or shared between drawings? (rhetorical)
    Not to my knowledge.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

  9. #9
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,134

    Default

    I have moved your thread to the The CUI, Hatches, Linetypes, Scripts & Macros forum.

    Please read the CODE POSTING GUIDELINES and edit your posts!
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  10. #10
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,791

    Default

    Registered forum members do not see this ad.

    Re to long your macro in two words can be as long as you like.
    script mycleanupmacro
    A man who never made mistakes never made anything

Similar Threads

  1. MACRO PROBLEMS. Custom Button.
    By clydemit in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 4th Apr 2012, 04:22 pm
  2. Custom toolbar and purge macro
    By mshearer in forum AutoLISP, Visual LISP & DCL
    Replies: 26
    Last Post: 7th Jan 2009, 08:25 pm
  3. Can't duplicate a custom button with macro
    By Vigilante in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 30th Jul 2008, 08:45 pm
  4. AutoCAD 2007 Custom Interface Macro
    By noochstyle in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 30th Jan 2007, 09:01 pm
  5. How to run a VBA macro from a custom toolbar button?
    By NigelFinch1 in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 27th Jun 2006, 07:56 pm

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