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,
|
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,
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