I want to migrate my VB code to VB.NET code, migrate the below code?
Private Function GetEntities(oLayerCollection As Collection, sSelectionSetName As String, _ Optional pointsList As Variant = Empty, _ Optional mode As AcSelect = acSelectionSetCrossingPolygon) As AcadSelectionSet Dim oSS As AcadSelectionSet
We have this need to have all of the solids in a drawing to be placed in the "solid" layer.
Sometimes folks are drafting lines to develop these solids, and keeping the lines on the "solid" layer, rather than moving them to another layer, or deleting them altogether.
I could get folks to run this command before leaving the drawing.
I'm thinking something along the lines of:
Select all entities that are on the solids layer that are not solids.
If nil, great, do nothing.
If entities are selected, let me do something with them.
I'm hoping the following can be modified ever so slightly.
(setq non_solid (ssget "X" (list (cons 0 "3DSOLID")(cons 8 "solid"))))
How do I select entities by extent. Let's suppose I have Lowerx ,lowery , upperx , uppery [174.76789855957,28.3978977203369 , 507.941253662109 ,112.090751647949 ]. How do I find entities who have these extents.
I select all entities via Editor.SelectAll() method, but the nested entities (inside Blocks) are missing. Do I have to resolve them by iterating through all blocks afterwards or is there a Prompt Selection Option that can be set?
I don't want the user to select the entities, instead I loop through the whole drawing.
In this case I would like to select all entities on a series of layers. (i.e.: a-site-* or a-fill*). I know I can do this with qselect by doing each layer one at a time and append the existing selection set.
Instead, I've been locking all layers except the series I'm looking for, but it seems like there should be a quicker way.
I have a command which proccess entities in the drawing and creates a SelectionSet. But, on the drawing i do not see the selected objects . I need to show grips on selected objects . It is a looks like a Quick Select command. What can i do? What method showing the grips?
I coded a utility to work with entities rotation. This is a part of a bigger project so i just cutt and pasted together the part of code that have this problem.
Basically i get the selection, i clone it (because this is a copy and rotate) and through a draw jig class i rotate all the entities. This works well but just sometimes when the command ends it happened this weird thing, the entities appears in the draw but they can't be selected. And all get back to the normally after saving, closing and reopening the draw.
This is the utility.
public void Run(object param) { Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; Database db = doc.Database; List<Entity> toRotate = new List<Entity>(); PromptSelectionOptions pso = new PromptSelectionOptions(); pso.MessageForAdding = " Select objects"; pso.AllowDuplicates = false; pso.AllowSubSelections = false; PromptSelectionResult psr = [code]........
When trying to select entities with a window or crossing polygon (and hitting enter) there are no grips showing to indicate that the selection has been completed even though the entities seem to be highlighted. Syntax: select, enter, wp, enter (draw polygon), enter.
I am a part time user of this wonderful program and only recently moved to 2010 and yet I cannot figure out what I am doing wrong. I have Googled and looked in my texts and still am having difficulty (also attempted to search FAQ on this site but the link malfunctioned).
When I select more than 100 entities all of the grip points disappear. With ACAD 2002 there seemed to be no limit to the number of entities you could select without losing the grips, but with ACAD 2007 they started dissapearing though with '07 clicking "View" "Regen" would bring them back into view (unless you accidentally click on another entity). With ACAD 2013 if I go over 100 that's it. This is mostly a problem for me as I use the spacebar shortcuts extensively in creating and manipulating my drawings. I have found other ways to to acomplish my needs such as using the move command but I have much successful history using my old methods and would like to continue with them.
The 'application' I am trying to make currently adds entites to a drawing. Each entity has data associated with it but also part of a tree of infomation so I store xrecord data along with the objectID in a dictionary tree within the drawing.
I want to be able to select multiple entities and have any matching data shown in a palette. The same way the properties palette behaves.
I have it working but I can see AutoCAD crunching the data. It cycles through the selection set and the dictionary tree extracting entity data until it finds an ID match in the xrecord.
How the properties palette works so quickly or how I could improve the speed.
How could I get the ObjectIdCollection of all entities (points, polyline) in a certain layer?
I am using the following code at this moment.
private ObjectIdCollection GetEntitiesOnLayer(string layerName) { Editor ed = doc.Editor; TypedValue[] tvs = new TypedValue[1] { new TypedValue((int)DxfCode.LayerName, layerName) }; SelectionFilter sf = new SelectionFilter(tvs); PromptSelectionResult psr = ed.SelectAll(sf);
[code]....
But it seems the function fetches more ObjectId than I expected.For example, if I draw 3 points and 2 polylines in "A" layer.
ObjectIdCollection obc = GetEntitiesOnLayer("A");
int i = obc.Count;
I was expecting i to be 5 (3 points and 2 polylines), but i seems to be more than 5.
I want to know if there is a command that passes all entities (lines, text, etc.) to a single layer, but that the institution holds the color and line style assigned according to the original layer that contained it.
Today i opened a psd file which 200 layers. Paint.net is very slow then (as all layers are flatten, pdn is missing hierarchical layers), but that is another problem.
I wanted to hide some background layers and "copy merged" a selection.
It took me 10mn to find all the backgrounds layers without this tool.
In photoshop the tool exist as a property of the "move selection" tool. Ie: you must first select the move selection tool, then select "layer" in the properties toolbar.
Any way to get that for v4 ? Will v4 be on github so we can clone and make patches ?
I can do one or another, but both at the same time? It is annoying because a mask selection turns into layer selection when you select a second layer/folder.
How can I select a shape on a layer in PSD in the layers palette?
In my past version of PSD, I was able to simply click on the Layer and hold either select or control to have marching ants go around my image - but with CS2 I am not able to do that.
I have an image with 8 layers and i want to draw lines. So I make a new layer. While this layer is selected, i select the line tool and draw a line. Then, as I want to move this line, I select the move tool and try to move it. But instead of moving the line I just drew, photoshop automatically switches to my background layer (although i'm not sure it's defined as "background layer") and moves the entire content of the layer.
To see what actually happened, i hid each layer in the layer palette... And still... here was my line. (with all layers hidden, is it POSSIBLE to have anything?)
I tried to select my line and then, using the move tool, move it, but the message "could not move the selection because the selected area is empty"...
I have a problem with my layer controls. When I open a DWG-file I need to go to my layer properties manager and select "All" layers to be able to select a specific layer in my dwg.
It is pretty annoying when you need to open layer properties manager every time you open a dwg and select "All" just to be able to select a specific layer.
Is there any default settings that I have to change so it's selected "All" by default?
Currently, when I'm converting architectural drawings into backgrounds for my use, one of the first things I do is select certain objects based on their layer and delete them en mass.
I'm using the QSelect dialog box at the moment, but that's really difficult. I would try writing a LISP or something, but I don't know of a command line version of the QS command to make it work.
Is there a way that I can select one object, and make it select all the other objects in the drawing that are on the same layer? The QS command is handy, but very tedious.
is there a way to choose black as a layer color (for text)? I frequently print USGS map sections with notes added on. I would prefer the text simply be black rather than dark gray (or any of the other dark colors). Typically my drawings are all monochrome, so its not an issue. However, USGS prints are all in color, white text is not automatically recognized as black due to the colored background. Therefore it prints white (absence of color over background) and can't be easily read.
Currently I use color 250. Is there a trick or add-on that would let me select straight black for my text or layer color?
I have an architects plan consisting of many different layers, I have exploded all the plan so that there are no blocks.
I have now created a layer called building. I have selected everything and and placed it on this layer. The layer colour is colour 8.
I now want everything to be by layer so that it is all colour 8. However when I select all (151038 items) and change it all to by layer nothing changes. All colours stay as they are.
But if I was to go and select a small area at a time it allows me to change them to by layer and the colours change to colour 8 as desired.
How to select all and select by layer and have all the colours change in one go rather than me going around the drawing selected sections at a time to make the colours change.
Dim editor As Editor = Application.DocumentManager.MdiActiveDocument.Editor Dim db As Database = HostApplicationServices.WorkingDatabase Dim tr As Transaction = db.TransactionManager.StartTransaction()
[Code].....
the only prob is : I want selec all block but not the block on layer frozen, off or not visible...
I can check all layer stat on each block.. (i do that already for check each block (name) but i want a solution more easy.)
i have created viewports on the defpoints layer in paper space, but now i can't select them to modify. Is there a switch or variable that allows depoints objects to be selected?
I am working on a .dwg file in AutoCAD 2013 , and on one specific layer (defpoints), I am not able to select any of the objects. Initially, I thought that the layer may have been locked or frozen, but it is not. Additionally, I went ahead and locked then unlocked the layer as well as froze then thawed the layer, still not able to select any objects on the layer.
My next attempt to fix the problem was to run the command "AUDIT", and instructed to "Yes" fix any errors detected. The command seemed to execute correctly, however, it did not do anything. The objects on the layer still cannot be selected.
I am interested in a program that can select layers by its color, and then change those layers to a different color and add a prefix of Z- in front of those layers.
I found a program (below) that works pretty close to what I am looking for but not quite.
;;; Change the color of a layer to another color by Jeff Mishler July 9, 2003 ;;; Usage - (lay_col_chg oldcolor newcolor ;;; example: Command: (lay_col_chg 142 100)
I am using the command Draw Order and would like to use the Quick Select so that I can select all objects on a specific layer. How do I use the Quick Select in conjuction with the Draw Order command?
I would like to select blocks based on the layer of one or more attributes. The obvious method would be to isolate that layer and select the ones with attributes that display. But many of the values are empty!