+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 18 of 18
  1. #11
    Forum Deity steven-g's Avatar
    Computer Details
    steven-g's Computer Details
    Operating System:
    Win 7
    Discipline
    Construction
    steven-g's Discipline Details
    Occupation
    Draughtsman
    Discipline
    Construction
    Details
    I work in the estimating department of a large building contractor.
    Using
    AutoCAD 2017
    Join Date
    May 2013
    Location
    An Englishman in Belgium
    Posts
    2,043

    Default

    Registered forum members do not see this ad.

    I have just seen your latest reply, before I really look at it, here is the start of an idea, it works here for the first two options. the layout is setup to your plotter so that is the default value, the macro asks you to input a number 0,1 or 2, 0=plotter(default value), 1=DWG To PDF, 2=? this still needs looking at do you have a named device for the PLT option.
    Code:
    ^C^C_setenv;plot_to_0=ploter_1=PDF_2=file;\-plot;n;;;$M=$(if,$(eq,$(getenv,plot_to_0=ploter_1=PDF_2=file),0),;,$(if,$(eq,$(getenv,plot_to_0=ploter_1=PDF_2=file),1),"DWG To PDF.pc3";,$(if,$(eq,$(getenv,plot_to_0=ploter_1=PDF_2=file),2),PLT;,^C)));n;

  2. #12
    Forum Deity steven-g's Avatar
    Computer Details
    steven-g's Computer Details
    Operating System:
    Win 7
    Discipline
    Construction
    steven-g's Discipline Details
    Occupation
    Draughtsman
    Discipline
    Construction
    Details
    I work in the estimating department of a large building contractor.
    Using
    AutoCAD 2017
    Join Date
    May 2013
    Location
    An Englishman in Belgium
    Posts
    2,043

    Default

    Quote Originally Posted by Taurenis View Post
    Ok. I totally got where we were not connecting.
    The thing is that our plotter is a bit old and has a "character".
    1) In order to be able to print with correct margins, I had to create a custom paper size with a custom margins and define custom offsets in PageSetup (PS). So plotter is actually using a different paper from the one built-in ACAD PDF creator uses even though the outcome is the same.
    2) For our plotter I can only save 5 custom paper sizes per pc3 file. So I created a pc3 file for A3+*A3.2+A3.1+A3.0, A2+A2.1+A2.0 and A1+A1.0 (so it's three pc3 files/plotting devices for ISO paper sizes).
    So the paper size does actually change per layout depending on the output device, does this mean that you do have a named PageSetup for all the variations.
    Last edited by SLW210; 24th Sep 2014 at 01:01 pm. Reason: Fixed quote tag

  3. #13
    Forum Newbie
    Computer Details
    Taurenis's Computer Details
    Operating System:
    Windows 7
    CPU:
    Intel Core i7-2600
    RAM:
    8 GB
    Graphics:
    AMD Radeon HD 6700 Series; 1GB
    Monitor:
    Samsung SyncMaster 226BW
    Using
    AutoCAD 2014
    Join Date
    Sep 2014
    Location
    Latvia
    Posts
    8

    Default

    That's correct - a named PS for each variation. It took a while but knowing the issues we were having with drawing production - it's worth it.

  4. #14
    Forum Deity steven-g's Avatar
    Computer Details
    steven-g's Computer Details
    Operating System:
    Win 7
    Discipline
    Construction
    steven-g's Discipline Details
    Occupation
    Draughtsman
    Discipline
    Construction
    Details
    I work in the estimating department of a large building contractor.
    Using
    AutoCAD 2017
    Join Date
    May 2013
    Location
    An Englishman in Belgium
    Posts
    2,043

    Default

    OK first thankyou for this question, it got the old grey matter working.
    Try this code it will no doubt fail but it's a starting point, this does have a few requirements from you first, for each PageSetup name, make a new layer and name it exactly the same (if you have spaces it might not work), on each layout put 3 mtext items with the text "plot" "pdf" "plt". Change the layer of each text to match the PageSetup for that particular layout. I'd just do one layout and 3 layers as a test. If this works you can create a template file with everything setup later.
    Next try set macrotrace=1 then run this macro, if it works yippee, it won't so after running it copy the command history and post it here.
    When the macro runs it should pause - at this point you need to click one of the text items depending on which device you want - it uses the layer name to use as the PageSetup.
    It works here but I don't know your system or the names used
    Code:
    ^C^Csetenv;temp;$m=$(getvar,clayer);laymcur;\setenv;temp1;"$m=$(getvar,clayer)";clayer;"$m=$(getenv,temp");-plot;n;;"""$m=$(getenv,temp1)""";;;n;
    This shows what I am trying to explain - the word PDF is on the layer A4PDF and A4PDF is the name of the PageSetup for an A4 PDF Layer.jpg

  5. #15
    Forum Newbie
    Computer Details
    Taurenis's Computer Details
    Operating System:
    Windows 7
    CPU:
    Intel Core i7-2600
    RAM:
    8 GB
    Graphics:
    AMD Radeon HD 6700 Series; 1GB
    Monitor:
    Samsung SyncMaster 226BW
    Using
    AutoCAD 2014
    Join Date
    Sep 2014
    Location
    Latvia
    Posts
    8

    Default

    Haven't used "setenv" "temp" etc. before. It's a whole new world to explore

    1) the code works
    2) unfortunately only on LT (I'm using full ACAD myself and some of my collegues are as well)
    3) spaces do cause a problem (ACAD interprets it as "enter")
    4) for pdf and plt I would suggest adding "~;" at the end of the code, just before last "n" (that brings up the "Save" dialog box)
    ^C^Csetenv;temp;$m=$(getvar,clayer);laymcur;\seten v;temp1;"$m=$(getvar,clayer)";clayer;"$m=$(getenv, temp");-plot;n;;"""$m=$(getenv,temp1)""";;;~;n;

    If this was only the first step, I'm ready to hear out the next one. If this was the final solution, I must admit that it's not what I was looking for. I don't want the user to make any other choices but the file name and final question about plotting after the user has pressed one of the buttons (plot/create pdf/create plt)

  6. #16
    Forum Deity steven-g's Avatar
    Computer Details
    steven-g's Computer Details
    Operating System:
    Win 7
    Discipline
    Construction
    steven-g's Discipline Details
    Occupation
    Draughtsman
    Discipline
    Construction
    Details
    I work in the estimating department of a large building contractor.
    Using
    AutoCAD 2017
    Join Date
    May 2013
    Location
    An Englishman in Belgium
    Posts
    2,043

    Default

    Yay +1 for LT, apparently that is an LT only option, usually it's the other way round. I'm sorry if this option is a bit disapointing for you, the basic concept is all I can think of, getting it to work is just tidying up. I have scratched my head over this but can't think of anything that is based in the layout that could be used to read information into a macro even using the setenv command the variable is not locked to a layout, even creating a load of macro's for each PageSetup there isn't a way that I know of, to make a macro layout based. And diesel just doesn't have the descision making capabilities of LISP. The question still remains open though, how did you see the user choosing between the different output devices, you mentioned an attribute or text, but they would still somehow have to set that up first before printing, would that be done manually or by editing.

  7. #17
    Forum Newbie
    Computer Details
    Taurenis's Computer Details
    Operating System:
    Windows 7
    CPU:
    Intel Core i7-2600
    RAM:
    8 GB
    Graphics:
    AMD Radeon HD 6700 Series; 1GB
    Monitor:
    Samsung SyncMaster 226BW
    Using
    AutoCAD 2014
    Join Date
    Sep 2014
    Location
    Latvia
    Posts
    8

    Default

    The attribute or text would be loaded (imported) with the layout from template. So no problem with that.
    If only it was possible at some point in the command string to say "please read and use the value of attribute called "pdf"" the problem would be solved.
    Hopefully there is an answer out there. I will post it here if I find it.
    Thanks for the work you have done looking for a solution!

  8. #18
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,745

    Default

    Registered forum members do not see this ad.

    I have 7 different plot settings in a menu you say your using Autocad so each of these just has a different plotter set up for the same size title block. In one place I worked at we had two title blocks ours and a government authority title block slightly different sheet settings so just had two macros not rocket science.

    For code http://www.cadtutor.net/forum/showth...=Printing-LISP

    Plotters.jpg
    A man who never made mistakes never made anything

Similar Threads

  1. Replies: 6
    Last Post: 17th Mar 2012, 02:32 pm
  2. Replies: 5
    Last Post: 25th Jan 2011, 06:49 am
  3. LISP: Read a character from string?
    By Olhado_ in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 24th Jan 2010, 09:42 am
  4. Tool Palette Command String
    By neekcotrack in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 5th Aug 2008, 04:46 pm
  5. Adding a String to the Text Command
    By muppetfan88 in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 29th Apr 2006, 03:49 am

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