Kostritz
4th Feb 2009, 09:55 pm
I've been trying unsuccessfully to create a script/macro that does the following from within a sheet file with a base plan xref:
-user input: active viewport
-user input: plan, RCP, demolition, enlarged plan
-load the vplayer linetypes, colors, and visibility appropriate to the selected view mode above
Behind the scenes, I have created a base plan template on our server with .las files for each of the appropriate layer settings so they can be called by the script.
I had hoped that I could have a combination of scripts and macros do the job of:
-entering the model space of the viewport selected
-assigning the selected layer settings for the xref layers appropriate to the user selected view (plan, etc)
-making vplayers=modelspace layers and then
-return the xref to base settings in model space while retaining the newly created vp settings.
This may seem overly complicated, but the reason I want to do it this way is to allow our office to create a base resource for layer settings in the form of a template with layerstates; that way, if we have to change settings in the future, we change it once - the script can be run on any new and old files to make the change.
I think I can figure out most of the above...but I'm stuck on assigning modelspace xref layers to vplayer settings and having them "stick" in the viewport. If I could access a variable for each layer property and assign it to a variable for vp settings for that layer, it would be a simple matter of using something like *base*|* for the layer name and having the script go through all of the layers. Is there a way to do this? Without access to LISP (AutoCAD LT), this seems difficult.
Thanks for reading this far...I couldn't come up with a more concise way to put the question!
-user input: active viewport
-user input: plan, RCP, demolition, enlarged plan
-load the vplayer linetypes, colors, and visibility appropriate to the selected view mode above
Behind the scenes, I have created a base plan template on our server with .las files for each of the appropriate layer settings so they can be called by the script.
I had hoped that I could have a combination of scripts and macros do the job of:
-entering the model space of the viewport selected
-assigning the selected layer settings for the xref layers appropriate to the user selected view (plan, etc)
-making vplayers=modelspace layers and then
-return the xref to base settings in model space while retaining the newly created vp settings.
This may seem overly complicated, but the reason I want to do it this way is to allow our office to create a base resource for layer settings in the form of a template with layerstates; that way, if we have to change settings in the future, we change it once - the script can be run on any new and old files to make the change.
I think I can figure out most of the above...but I'm stuck on assigning modelspace xref layers to vplayer settings and having them "stick" in the viewport. If I could access a variable for each layer property and assign it to a variable for vp settings for that layer, it would be a simple matter of using something like *base*|* for the layer name and having the script go through all of the layers. Is there a way to do this? Without access to LISP (AutoCAD LT), this seems difficult.
Thanks for reading this far...I couldn't come up with a more concise way to put the question!