AutoCAD .NET :: Simple Program To Gather Layers And Change To Different Layers

Jul 23, 2013

I am just starting to learn C# and .NET and I am trying to write a simple program to gather all the layers from a drawing in a directory, save them to a list, and use that list to change those layers to the appropriate layers. The way I want it to iterate is open the first drawing, gather the layers, ask the user which layer they want to change the original layer to, and when they select the new layer, it associates that old layer with the new layer so that in the future it won't prompt the user, it will just change it to that layer. Then it changes the layers and goes to the next drawing.

I wrote something very simple in LISP, but I need to make it more advanced and try to add in more features. Specifically I would like to be able to do everything in the background, without actually opening the drawings so I can avoid any user prompts or dialogue boxes.

I am at a complete loss at where to start though. There are so many members in the different namespaces for Autocad. Right now I am looking through acdbmgd.dll and acmgd.dll to try and find something useful, but I have no idea where to even start.

My guess would be to first define a method that gathers the layers from the drawing and saves them to an array. For example i would have multiple arrays for the different layers to which I want to convert the old layers, string [] 0layer, string [] walllayer that contains all of the layers to be changed to layer 0 and wall layer. Then I would compare the layers in the drawing to those arrays, if they are not present in any of the arrays, the program would prompt the user and ask which layers they want to change the existing layer to and add it to the appropriate drawing. Then all of the layers in those arrays would be changed to the different new layers.

At the very least, I am going to start making the different arrays to be filled. That much I can do. I'm just having trouble actually getting the data from the drawings.

View 2 Replies


ADVERTISEMENT

AutoCAD .NET :: Trying To Write Layer Gather And Change Program In C#

Aug 2, 2013

I am trying to write a layer gathering and changing program that will store a lists of layers based on layers they need to be changed to. I am writing it in C# and the part that is killing me is I need to store the old layers before I convert them so that way in the future the program will automatically know to change those layers to the appropriate layer.

I am trying to use an .xml file to permanently store the layers, and a serializer to read the layers into a dictionary so that I can search and see if I have already come across a layer.

I know that sounds very convoluted so let me simplify the problem. We have our layers which are only 7 layers. We get drawings from outside sources and they have their layers. Their layers correspond to one our 7 layers. We have a list showing which of their layers correspond to one of our layers. When we get drawings with layers we've never seen before, we need to search through the list to confirm it isn't already there and if it is not present, then ask the user to which of our layers their new layer should be associated.

I want to store the data in a xml file in a manner similar to this <ourlayertheirlayer> ourlayer1, somerandomthintg ourlayer1, anotherrandomthing ourlayer1, thisrandomthing ourlayer2, whatisthis ourlayer2, whoisthis ourlayer3, whycantifigurethisout ourlayer3, canyoufigureitout</ourlayertheirlayer>

 Then I want to serialize the xml file and save the data in a Dictionary<string,string> type whre the first string is one of our layers and the second string is their layer.

I want the data in the xml file to persist between application sessions, but the dictionary would be filled each the program is started.Later in the program I will use the Dictionary to gather all the objects based on their layer, the second string in the dictionary, and convert them to our corresponding layer, the first string in the dictionary.

I am having trouble setting up my types in C# though. How do I create an xml serializer that will read ourlayer, theirlayer from an xml file and save it to a Dictionary. The data doesn't have to be in the xml file in that format either, I just can't think of an easier way than commas to sepearte the two pieces of data.

public class OursTheirs{ public List<string>[,] goToDict { get; set; }}public class oursTheirsComma{ public string commaPresent { get; set; }}public static class SerializeAddToDict{ public static string getFromXML(string xml) { XmlSerializer xmls = new XMLSerializer(typeof(string)); return xmls.Deserialize(new StringReader(xml)) as string; } public static List<string>[,] ParseXML { //Stuff here

I haven't figured out to convert the string to a //List<string>[,] where the first column is one of our 7 layers,second //column their layer } //Then some other stuff here to add the stuff to a dictionary}

 I just starting learning C# and .NET.
 

View 5 Replies View Related

AutoCad :: Select Different Layers - Layers Name In Toolbar Does Not Change

Apr 29, 2006

when i select diffrent layers,the layer's name in toolbar does not change, i can not change the layer, color,and other settings.my autocad version is 2006 and 2007.

View 5 Replies View Related

Photoshop :: Simple Animation: Turning An Image With 3 Layers Into A Simple Animation

Dec 25, 2007

I only just got photoshop yesterday and I barely know a thing but I have got an image with 3 layers and I want to make it into a simple animation, displaying each layer in turn.

I am a novice user using C2

View 1 Replies View Related

Photoshop :: Simple Question On Layers

Dec 12, 2005

How do I view layers seperately. I dont want all the layers to show on the workspace. When I select a Layer..I only want to see that layer on the workspace..

View 3 Replies View Related

GIMP :: Make Logo Consisting Of Bunch Of Simple Shapes Which Are All Individual Layers

Sep 2, 2013

I'm trying to make a logo consisting of a bunch of simple shapes which are all individual layers. All of these layers are on top of a transparent canvas. I'm not sure if canvas is the right word, but basically what I mean is that I launched GIMP and made a new image that's 512x512 filled with transparency, and by default that became a layer titled background which I consider to be the canvas of my entire Image.

I can't seem to draw on new layers anymore. I've been trying to make new layers filled with transparency and draw on them with the free select tool, ensuring that the opacity is not 0 and that the layer is selected, but its drawing on the background layer rather than the layer I made to draw on. So now when I try to adjust the position of the layer, the shape I drew stays in the same spot because its not part of the layer.

View 1 Replies View Related

Photoshop :: Program Error When Trying To Use Effect Within Layers Palette

Jan 24, 2013

When I am trying to use the effect options with in the layers palette I get the annoying message:
 
' Could not complete your request because of a program error. '
 
It was working fine then it went funny. I have restarted photoshop, my machine and re-installed the software but stiill not fix.

View 2 Replies View Related

Illustrator :: CC - Layers - Row Size Resets On Program Shutdown

Oct 3, 2013

In illustrator I like my row size to be at 50px in size. Every time I close down AI and reopen it later it seems that the layers have reverted back to their default sizes (I think its like normal or somthing cartoonishly small)
 
To get to the option panel I'm talking about, bring up your layers in AI then in the top right drop down menu select Panel Options at the very bottom of the contextule menu, and in that window the top options are "Row Size".This is where I pick "Other" and then set it to 50px (every time).

View 1 Replies View Related

AutoCAD Civil 3D :: Lisp Routine For Thawing Layers Then Freezing Specific Layers

Dec 31, 2013

I would like to know how to write a routine to thaw all layers in current drawing and multiple xrefs; then freeze all, then thaw only certain layers globally for a drawing that is open.  Such as a dimension plan will thaw only *-BLDG, *-DIMS, *-RD-*, *BNDRY.

I would like to create one that will fit every project which has a different xref name.

View 2 Replies View Related

AutoCAD 2010 :: Macro To Create Layers And Place Text In The Layers?

Aug 12, 2013

We use AutoCad to name our dxf files for our Burn Table and whenever we get a new part it is a repetitive task to input layers and common text.  So what I am curious is can AutoCAD input the layers and text automatically using a Macro?

I want the Macro to put in 6 layers and choose the layer color and title then input text boxes with word in 3 different layers.  There will be about a total of 10 different text boxes with text already put in the boxes by the Macro.

View 6 Replies View Related

AutoCAD 2010 :: Bind Xref Layers To Master Layers

Mar 20, 2012

I am currently updating and coming up with a better system for are plant layout file for AutoCAD. When this project is complete, it will be set up so if someone needs to make a change they can just make a copy of the X-Ref file for the area they will be updating and hand it back in when there done. I will review the updated X-Ref then switch out the old X-Ref file for the updated one.

Problem: the problem I am having is when I am in the master drawing that contains all the X-Ref files, the layers list becomes enormous. There are about 30 to 40 different X-Ref files with 15 layers each. Those 15 layers contain the exact same information but you have to edit them individually.

Question: Is there a way to make the 15 layers in the master effect the corresponding layer in all the X-ref files? For instance, you hide the “Machines” layer in the master and it hides the “Machines” layer in all the X-ref.

Side Note: If you were going to make the suggestion “use Xbind” I’ve tried it and it doesn’t work well because “Xbind” creates a new layer you have to assign to things instead of making the layers relate to one another.

View 5 Replies View Related

AutoCad 3D :: Won't Delete Layers In Drawing In Layers Properties Manager

Sep 20, 2006

There are some layers in my drawing that won't delete in the layers properties manager. I don't know why. It gives me 4 possible reasons:

- It might be layer 0 or a Defpoint (whatever that is).
- It is the current layer
- It is an Xref dependent layer
- It is a layer containing objects

But none of these, to my knowledge, apply. There could be things on the layer that I'm just not seeing, but I've looked thoroughly. I even zoomed out to the extents, highlighted the whole area, and clicked the erase tool, but it still won't go away. I got the file from another computer, so it might be an Xref dependent layer and the Xref'ed files just didn't come with it. How would I be able to tell - and how could I remove the Xref dependency?

Other than that, is there any other reason a layer won't delete? Can I force it to delete?

View 5 Replies View Related

AutoCad :: Using Layers To Change Viewports

Apr 29, 2013

Attached is file.

Model Space: has two objects one being a circle and one a rectangle

Paper Space: I have created two layers title "Area 1 Viewport" and "Area 2 Viewport". My goal is to get it so I can "Area 1" layer and the circle appears but when I turn it off that viewport goes away. Then when I apply "Area 2" viewport the rectangle appears but when turned off the viewport goes away. Currently the frame of the viewport is assigned to the layer but the objects still stay.

View 7 Replies View Related

AutoCad :: Layers Won't Change Colours?

Aug 9, 2012

everytime that i try and match properties or change the line type by selecting a layer in the layer properites manager, all the lines stay the same (as if nothing has happened). the lines that i am selecting are not in blocks

why i can not change the lines types or colours?

View 7 Replies View Related

AutoCad :: Cannot Change LineType In Layers

Jun 8, 2013

I've currently create several layers and after i change in one of 'em the linetype from continuous to a "Dashed" , every new layer i made had a "dashed" linetype and when i tried to change it back to default.

View 6 Replies View Related

AutoCad 2D :: How To Change Color Of Layers

Mar 23, 2011

I recieved a drawing from another person. Now I want to change the color of the layers. Every time I change a thing, nothing happens.

I tried to change the properties, I tried using the command color.

It just doesn't work!

Pickfirst = '1'

Solution: Select everything and use the command explode. Then right click and change the color in properties.

View 9 Replies View Related

AutoCAD 2013 :: Setting Layers To Automatically Change?

May 23, 2012

Is there a way in AutoCAD 2013 to have it automatically change to a certain layer when you do common tasks.  I am wondering if there is a system variable, or a routine that I could automatically load when I start AutoCAD to do this.  It would also be nice that the layer would then go back to the original layer that was being used prior to the command.  What are my options for doing this.

For instance when I load an xref I would like it to go on the layer; A-XREF.  When I insert a block I would like it to go on the layer; 0, when I create a new dimension I would like it to go on the A-DIMS layer,  when I create a hatch it would set to the layer A-WALL-PATT, when I add a leader  with text it would go to A-ANNO-NOTE, etc..

View 1 Replies View Related

AutoCAD 2010 :: Create Shortcuts To Change Between Layers?

Apr 30, 2012

s it possible to create shortcuts to change between layers rather than using the pull down menu to select the layer required?

View 9 Replies View Related

AutoCAD Inventor :: Change Parts To Unique Layers In IDW

Nov 26, 2012

Any macro to do it automatically....

i still have the change occurrence layer based on material macro but cant seem to find the change layer based on part... 

yes we are still using autocad in conjunction with inventor, and on a side note have been quite enjoying the new parameters, dynamic blocks, easy scripts and customization features in autocad.

View 4 Replies View Related

AutoCad :: Change Non-Xref Layers Show Up As Default

Jun 3, 2012

For several releases Autocad's layer manager has shown only XREF layers in the layer manager by default. Open a drawing with Xrefs (nearly every drawing I have ever worked with) and to access the layers that are actually *in* the drawing, I must first open the layer manager, select the "Xref" filter, and check the Invert Filter box. Then I see the layers that would more logically be shown be default.

Does any way to change this so the non-Xref layers show up be default??? I am currently using Autocad Architecture 2012.

View 8 Replies View Related

Photoshop :: Deleting Duplicate Layers Linked To Others Make Remaining Layers Invisible?

Aug 6, 2013

I'm using CS6 and noticed that whenever I delete a layer that was a dupe of another layer with links (although not linked specifically to the deleted layer), the undeleted original layers become invisible on the canvas even though they are still visible in the layers pallette. I've been able to recreate this several times. Nothing I do will make the layers visible -I've tried moving them all to the top of the layers palette, making sure their opacity is 100%, making sure there are no layer effects, etc.

View 2 Replies View Related

Photoshop :: Copy Linked Layers In Layers Palette Without Maintaining Links To Originals

Sep 30, 2013

I often will copy a layer in the layers palette via option drag. If the original layer is linked to another, the new layer is also linked to the orginal layer I copied as well as any other layers that original was linked to.
 
Is there anyway to option drag to copy a layer in the layers palette without the new layer being linked?

View 3 Replies View Related

Photoshop Elements :: All Image Layers Have Randomly Converted To Smart Object Layers?

Mar 20, 2013

All of my image layers have randomly converted to smart object layers and I can no longer resize them in the ps document. Why would it do this and how can I undo it?

View 3 Replies View Related

Photoshop :: Apply Adjustment Layers To Multiple Layers That Have Different Blending Modes?

Sep 6, 2013

How to Apply adjustment layers to multiple layers that have different blending modes  and keep the colors the same as the adjustment done?
 
I work in Animation painting Backgrounds.  My files are sometimes upwards to 200+ layers.I will use adjustment layers to quickly balance colours and constrast on top of those many many layers.
 
The only way that I know of how to apply adjustment layers it to every single layer  ( by applying I mean I need to get rid of the adjustment layers because we cant use them in production but i need the new colours be applied to all layers underneath ) in a psd is to manually do it By duplicating the adjusment layer 200+ times and  then merging each layer to one of those adjustment layers so that that layer can take the adjustment layers effect permanently.
 
The issue is that Within Those 200 layers I have some layers set to Multiply or OVERLAY.    IT obviously wont apply the adjustment layer properly to those layers because those layer blend mode affect the layers under them. The colour wont be the same anymore in the spots that had the multiply blended mode.

[URL]

I have 2 adjustment layers up top.  I need to get rid of them by applying them to each layer! I cannot merge any of the layers. We need all those layers for production.I can apply the adjustment layers manually and this works GREAT for all Layers set to normal.  THey take on the colour change just FINE.
 
However, The issue is that layer 6 and layer 4 are both set to mutiply and this screws up the colour once i apply the adjustment layers to each layer manually...
 
How can i apply my adjustment layers to a file like this with some layers being set to multiply while keeping the layers exactly the same configuration  and The new colour taking effect exactly how i looks before i apply the adjustment layers? Now the simple solution is to merge the multiply layers to the layer that it affects HOWEVER I NEED those multiply layers to be separate! 

View 4 Replies View Related

Photoshop :: Adding Same 3 Adjustment Layers To Many Photos Then Export Layers To File?

Aug 3, 2013

I want to add the same 3 adjustment layers to about 20 photos and then in scripts, export layers to files, so that each photo includes the adjustments.

View 6 Replies View Related

Photoshop Elements :: How To Create Layers In Adjustment Layer And Transfer Those Layers

Nov 11, 2012

How do I create layers in an adjustment layer and transfer  or duplicate those layers in another image ?
 
I need to transfer the same colour readjustment from one image to several other images ... I have been told to do this in the adjustment layer platform how ever I cannot drag or copy those layers over to the other images I have open and in need of adjustment to the same layers ...
 
Images shows my layout and what i've done this far

View 2 Replies View Related

Photoshop :: Increase Font Size In Many Text Layers At A Time By Selecting In Layers Panel

May 9, 2013

I would like to increase the font size in many text layers at a time by selecting them in the layers panel. The font increases, but the text boxes don't expand to fit the increased size text. So I am having to make each box bigger manually. Is there a way to have the boxes expand to fit bigger text automatically through the layers panel?

View 2 Replies View Related

Photoshop :: Merge Layers :: Results To A Slight Different Color Compare To Its Original Unmerged Layers

Jun 19, 2009

merged layer results to a slight different color compare to its original unmerged layers. the result is that the merged layer has more bluish, What's wrong and what's the solution?. Im using CS3.

View 9 Replies View Related

Photoshop :: How To Merge Adjustment Layers To Several Layers And Export To Files

May 31, 2012

I have now exactly the same problem as below with over 1000 images, I have saved them in .psd that has over 100 layers each. On top of those there is curves and levels layer that affects every layer below. I want to save all images to .jpg for videoedit with those curves at least. I don't want to merge same curves 100 times. Is there a solution in phothoshop cs5 or cs6 available? Would save alot of working hours. All I have got by this far is blank white images of adjustment layers and non adjusted jpg-files.
 
This discussion was opened in 2010 and I quess this is same problem:
"
How to merge adjustment layers to hundreds of layers?

Jul 28, 2010 10:38 AMSay I have a photoshop File with 100 layers. 

And say I created 3 adjustment layers on top of those 100 layers to get the adjustments that i want for those layers.   I'm happy with the adjustments but Then I NEED to merge those 3 adjustment layers to ALL those 100 layers.  

Is there a way to easily permanently apply the adjustments to each of those layers without having to do it manually? I absolutely need to merge the adjustments to the seperate layers because of how the layers are being used in a seperate 3d program.   
 
So far what I've been doing is duplicating the adjustment layers for each layer and merging them to said layers separately.. I wish I could just right click the adjustment layer and Tell it to merge to everylayer it affects  or apply to every layer underneath it!

View 3 Replies View Related

Photoshop :: How To Keep Layers Effects When Merging Layers To Save TIFF

Oct 16, 2013

I am loosing all my layers effects when I merge all the layers together to save the image in the tif format!

View 2 Replies View Related

AutoCAD 2010 :: Revision Cloud - Manually Change Layers

Apr 20, 2012

Is there a way to have the Revision Cloud be put on the correct layer by default rather than having to manually change layers??

IDSP Premium 2014 (mainly Civil 3D 2014 UKIE SP1 & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 256Gb SSD, 300Gb 15,000 rpm HDD
16Gb Ram Intel Xeon CPU E5-1607 0 @ 3.00GHz (4 CPUs), ~3.0GHz
NVIDIA Quadro 4000, Dual 27" Monitor, Dell T3600

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved