+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jul 2011
    Posts
    282

    Default automatic page changing

    Registered forum members do not see this ad.

    Hi i'm juste wondering if a lisp or something can set a attribute in a block to change automaticly according to the number or layout

    So if i create a new layout the page goes to the next and the other show how many layout it opened

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,921

    Default

    Insert a Field in the Attribute Value (right-click > Insert Field).
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jul 2011
    Posts
    282

    Default

    i tried its not working :S


    Cartouche.dwg


    Here is the block im trying to make the page number change

  4. #4
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jul 2011
    Posts
    282

    Default

    Hi here is what im looking for



    cartouche.JPG

    i think with this the code line here :

    Code:
    (setq total (itoa (length (layoutlist))))
    i could get what im looking for in the image that i have uploaded

    cheers and merry christmas !!

    hope some1 has and answer or when i come back to work ill get killed by my boss .. joke!!

  5. #5
    Forum Deity BlackBox's Avatar
    Computer Details
    BlackBox's Computer Details
    Operating System:
    Windows 8.1 Professional, Server 2012 R2 Datacenter
    Computer:
    Dell Precision T3600
    CPU:
    Hex-Core Intel Xeon 3.2Ghz
    RAM:
    32GB
    Graphics:
    3GB NVIDIA Quadro K4000
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB Western Digital VelociRaptor 10K RPM
    Monitor:
    Dual 24" Dell Ultrasharp Widescreen Monitors
    Using
    Civil 3D 2015
    Join Date
    Nov 2009
    Posts
    4,806

    Default

    You should consider using Sheet Set Manager (SSM).
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security

  6. #6
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jul 2011
    Posts
    282

    Default

    Hi, sorry for the late reponse I was on vacation. Well i'm not to familliar with (SSM) would you know a place i could get a tutorial* or some information about it.

    Thx

  7. #7
    Forum Deity BlackBox's Avatar
    Computer Details
    BlackBox's Computer Details
    Operating System:
    Windows 8.1 Professional, Server 2012 R2 Datacenter
    Computer:
    Dell Precision T3600
    CPU:
    Hex-Core Intel Xeon 3.2Ghz
    RAM:
    32GB
    Graphics:
    3GB NVIDIA Quadro K4000
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB Western Digital VelociRaptor 10K RPM
    Monitor:
    Dual 24" Dell Ultrasharp Widescreen Monitors
    Using
    Civil 3D 2015
    Join Date
    Nov 2009
    Posts
    4,806

    Default

    No worries; congrats on your (extended?) vacation. I'm on vacation all this week as well (packing & moving).

    To answer your question, consider this link to the user documentation: Understand the Sheet Set Manager Interface
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security

  8. #8
    Super Member fixo's Avatar
    Computer Details
    fixo's Computer Details
    Operating System:
    Windows 7
    Motherboard:
    E7500
    CPU:
    Intel(R)Core(TM)2 DUO CPU 2.93HGz
    RAM:
    4098 Gb
    Graphics:
    1024 Gb
    Using
    AutoCAD 2009
    Join Date
    Jul 2005
    Location
    Thanks God, I'm far enough from Hitleropa
    Posts
    1,697

    Default

    You may want to use this code yet
    I just tested it on converted A2009 format drawing

    Code:
    (defun C:paging(/ adoc atts id lay_field)
    (setq adoc (vla-get-activedocument (vlax-get-acad-object)))
      (vlax-for lt (vla-get-layouts adoc)
        (vla-put-activelayout adoc lt);optional
        (vlax-for obj (vla-get-block lt)
          (if (eq "AcDbBlockReference" (vla-get-objectname obj))
     (if (eq "Cartouche Aliance" (vla-get-effectivename obj))
            (if (eq :vlax-true (vla-get-hasattributes obj) )
            (progn
       (setq atts (vlax-invoke obj 'getattributes))
       (foreach x atts
         (if (eq "PAGE" (vla-get-tagstring x))
           (progn
             (setq id (vla-get-objectid (vla-get-layout (vla-objectidtoobject adoc (vla-get-ownerid obj)))))
             (setq lay_field (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa id)">%).Taborder \\f \"%tc1\">%"))
           (vla-put-textstring x lay_field)
           )
         )
       )
            )
         )
       )
     )
          )
        )
      (vla-put-activelayout adoc (vla-item (vla-get-layouts adoc) 0));activate Layout1, optional
    (princ)
      )
      (prompt "\Try command: Paging...")
      (prin1)
      (vl-load-com)
      (prin1)
    ~'J'~
    The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)

  9. #9
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jul 2011
    Posts
    282

    Default

    Registered forum members do not see this ad.

    Well thank it works well to change the pages.

    If i would want to make it so that the attribute "#page" inputs the total of layout is their a way.

Similar Threads

  1. Avoid text changing position when changing justification
    By floripabay in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 12
    Last Post: 26th Jun 2011, 12:29 am
  2. Page Orientation - Automatic Selection
    By nicolas in forum AutoCAD Drawing Management & Output
    Replies: 7
    Last Post: 20th Jun 2011, 05:00 pm
  3. Page Setup Resets To Portrait from Landscape in Sheet Set Page Setup Overrides DWT
    By Kapanther in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 30th Nov 2010, 12:31 am
  4. Replies: 1
    Last Post: 10th Nov 2010, 11:07 pm
  5. AC 2000 page setup keeps changing to inches
    By chrisfitton in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 0
    Last Post: 9th Apr 2010, 06:53 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