Results 1 to 2 of 2

Thread: Auto-updating viewports to updated/modified layerstates

  1. #1
    Active Member
    Join Date
    2006-11
    Location
    Auckland, New Zealand
    Posts
    92
    Login to Give a bone
    0

    Default Auto-updating viewports to updated/modified layerstates

    Apologies if this is somewhere within the forum....

    Is there anyway to get viewports with a particular layerstate applied to them to automatically update when that layerstate has been modified?


    Thanks in advance,

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Auto-updating viewports to updated/modified layerstates

    As I understand it, there is no way of determining when a layer state was last applied to a drawing, nor a particular PViewport... That is, not without adding a custom Dictionary, or XRecord to the drawing's database, etc..

    What you can do, and I have done previously to automate some of our layer states, is to use the LayerState-GetLastRestored function to query which layer state is applied to which drawing, etc., and use the returned string value to update either by using LayerState-Update if that which is contained within the drawing is good, or if it is not good, to use LayerState-Delete on that which is contained within the drawing followed by LayerState-Import + Restore respectively.

    As part of our process, yours can be different, I implemented commands that automated the process of redefining an external saved layer state file (.LAS) which was programmatically updated for any drawing that used a layer state by this name, so that updating a series of drawings was expedited.

    HTH
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Similar Threads

  1. Automatically updating when file name are rename, modified and changed.
    By Wish List System in forum AutoCAD Wish List
    Replies: 7
    Last Post: 2016-04-21, 04:47 PM
  2. Replies: 0
    Last Post: 2010-11-23, 11:59 AM
  3. updating spaces when you get updated arch model
    By davel.254027 in forum Revit MEP - General
    Replies: 8
    Last Post: 2010-11-22, 04:16 PM
  4. Layers not Auto-updating
    By mikej.185908 in forum CAD Management - General
    Replies: 2
    Last Post: 2010-09-16, 05:40 PM
  5. Updated Blocks NOT Updating
    By zorroxxxx in forum AutoCAD General
    Replies: 5
    Last Post: 2004-10-27, 08:20 PM

Posting Permissions

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