Knowledge Network. To translate this article, select a language. View Original Translate. English Original X. View Original X. Request: Import a layer or layers from a source drawing to a target drawing. The second parameter is the name of the file you are exporting the layer state to.
If you do not specify a path for the file, it is saved in the same directory in which the drawing was opened from. If the file name you specified already exists, the existing file is overwritten. Use a. The ImportLayerState method accepts one parameter: a string naming the file that contains the layer states you are importing. If the layer state you want to import does not exist in a LAS file, but a drawing file. You can open the drawing file and then use the ImportLayerStateFromDb method to import a layer state from the Database object of the other drawing.
When you import layer states, an error condition is raised if any properties referenced in the saved settings are not available in the drawing you are importing to. The import is completed, however, and default properties are used. For example, if an exported layer is set to a linetype that is not loaded in the drawing it is being imported into, an error condition is raised and the drawing's default linetype is substituted.
Your code should account for this error condition and continue processing if it is raised. If the imported file defines settings for layers that do not exist in the current drawing, those layers are created in the current drawing.
When you use the RestoreLayerState method, the properties specified when the settings were saved are assigned to the new layers; all other properties of the new layers are assigned default settings. I need importing and exporting custom layer property filters. Long story short, we XREF a lot of mechanical equipment in our models and when we create a structural drawing make all of the mechanical item print in a light ghosted color.
It took a long time to create, so I want to export it and import it into future drawing. I'm trying to import layer group filters from dwg to dwg. I know that this feature removed with Autocad I know i can import layer states, but layer states doesn't solve my problem.
I tried 'lfilterio' but it's not working. Or may be write one? Does Autodesk have the option to have a drop down for the layer filters, similar to the chose layer dropdown? Civil 3D SP4.
I created one for hiding Xref layers, which is an inverted filter. If i turn on the old layer dialog it is working in there. I know there are many differnt views about the ribbon so i dont need any of the comments telling me to turn it off and get on with it etc. If you look at the attached images you can see the screen shots of my problem. Note that i have the layer settings correct.
Autocad Help says that if the 'apply filter to layer toolbar' is on then it will apply this to the ribbon. Trying on Map3d We have a number of standard layer group filters. We also have a utility that allows us to re-create our standard layers with the push of a button, making it easy to use the PURGE command to keep the drawings clean.
We have noticed that once we purge our layers out, the group filters are broken. After reinserting the standard layers, some of them show no layers, and others show all of the layers, neither of which is correct. It seems that once a Group Layer Filter no longer sees the layers it was set to include in the layer list, it forgets all its settings and becomes useless.
It appears that the Layer Filters functionality is broken again with Others in the office running 64 bit did not have this problem with Running Windows 7 professional bit. While I have layer filter on using dialog, I want to add a new layer to this filter.
Normally you right click and add layer similar to the highlight layer, however, you if layer filter are on, then layer 1 is created. Then you have to find this layer, and rename it. I also can use the command prompt to created the layer, However, I want to create a layer name similar to the one in the filter, as if I index the layer. Example:C-topo-spot-existing-phase -1 New layer: C-topo-spot-existing-phase My company uses tons of Xrefs - wonderful, however problem comes when having to navigate through 's of layers to get to the main drawings layers.
So I tried using the layer filters to just show my main drawings layers. Here is the problem, I you can select show all layers, not good, can select just the xrefs show all of them or show just one of them, etc I tried setting up a custom layer filter, however, I don't know how to right the name or what selection to make that would allow me to exclude a set of layers.
Exception: eInvalidInput at Autodesk. Remove LayerFilter value [Code] Here is the code that produced this output. Why the Remove throws this exception? WorkingDatabase [Code] Is there a way to set up a layer filter to strip off the xref name? I have standard layers in all my drawings. I want to use a filter to setup the type of drawing.. However, from project to project the xref file name changes so filters don't work with the new name Anyway, if there is a way to hide the xref filename from the prefix of the layer..
Civil 3D SP2 Win 7, 64 bit. So i created a filter, turned it on and saved my layer state with this filter ON, and nothing was changed. I am using C3D with SP1. After I publish sheets using the sheet set manager my layer filters stop working will not filter layers, it will just display the last layer filter used prior to running the sheet set manager. This problem just started when I upgraded to When I try to set up layer filters the Layer filters properties dialog box does not show.
I'm guessing the function is working its is just that the dialog box is poping up somewhere out of view of the monitors, forgot to mention it is a 2 monitor set up. We have one template that we use for starting all our drawings. This contains all of our layers, layer filters and most commonly used blocks.
Is there a relatively simple way to add those filters to my sheets? Each sheet is a layout in a separate dwg file. I opened a drawing this morning that was sent to me by another office. I tried to open the layer property manager and it gave me a message that there were more layer filters than layers and that I should delete some of the filters.
I said ok, but the property manager dialog box never opened. Now I can't open the layer property manager dialog box in any of my drawings. I use point filters allot when measuring distances.
I noticed today using Full CAD that when i measured a distance Say 2m using a 'Y' point filter, between two objects not directly below one another the answer i got was wrong.
0コメント