AutoCAD .NET :: Unable To Select Entities After Clone And Rotation
Jul 25, 2013
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]........
My application inserts 4 DBText lines and 2 PolyLines into a drawing from another drawing(or Source Database). I created a special layer ("warning") into which these entities are inserted. Then I combined these entities into a group so the user can move it out of the way while they are working.
When the title block data is refreshed, I want to redraw my 4 lines of text and 2 lines at the location last set by the user. I have successfully implemented redrawing the object at the X and Y coordinates last placed by the user by using ent.TransformBy(Matrix3d.Displacement(acVec3d) on each entity at the source and then doing a DBSource.WblockCloneOjbects to put them in the destination drawing at the correct position.
However, if the user rotates the group, I need to make the rotation also. This is where I'm having problems. What is the best way to grab the rotation value(s?) from the existing, user placed group, and then redraw onto the drawing at that rotated value? Is there an easier implementation that the way I am doing it?
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.
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
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've used the clone tool since Photoshop 4, and it has greatly improved. The ability to preview the effect before clicking, the addition of patch and bandied tools, etc are great. The next version is supposed to have content aware moves.
However a basic feature that is lacking is the ability to rotate the clone selection. Cloning out lines crossing edges is hard. Cloning non edged areas is relatively easy, but edges in real life often follow a curve. Now that the clone tool has a preview, it would be good if keystrokes could rotate the clone clockwise or counterclockwise to better clone along curved edges. There are workarounds with ctrl-j selections, but they are cumbersome. I'm not saying the content aware features will not be useful, but more mundane improvements are lacking.
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?
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.
Civil 3D 2013, trying to edit a FG profile through the Profile Entities vista and Profile Layout Parameters dialog box. All entities in the vista are shaded (locked) and will not allow me to edit. Is there something that I am missing here? I should be able to edit the PVIs (or entities) correct? I couldn't find anything in documentation as to why these are shaded and not allowing me to edit them.
I somehow changed some settings that I would like to function.
1. I am unable to see my object rotate during the rotation command. What did I do?
2. During annotation in paper-space I am no longer able to click on my text to change, but must right click the selection, select properties, go to contents and click the ... in order to edit. How to I make it so I can simply double click the mtext box to edit? SOLVED: PICKFIRST RESET TO 1
3. In paper space I am unable to select any of my mtext boxes..what did I do? SOLVED: PICKFIRST RESET TO 1
4. When attempting to create a RAY I used to be able to see the RAY before I hit enter to set it, now I can't see it until after hitting enter a second time (after the initiatial command).
5. When selecting objects, I must enter the command first and then select the objects, I can no longer select the objects first. SOLVED: PICKFIRST RESET TO 1
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"))))
I have a plan with lots and lot numbering. I made the lot number text annotative and matching view orientation. But when it rotates in the view it rotates about the left justification point instead of middle as inserted into drawing. So I inserted lot numbert text into drawing and changed text to non-annotative, but now i can not change the text rotation angle unless i use rotate command on each individual piece of text (was trying to pick all text and change in properties box). Using feature lines to assist in grading design so not sure if this is an autocad problem or a civil 3d 2012 problem. I can rotate dtext made or inserted in drawing.
I am currently following the getting started guide for Maya 2011 and I have come to a portion where it is required to use the Extrude tool to extend a part of the helmet.(page 100 : Polygonal Modeling / Lesson 1 / Extruding polygon components)
Everything is fine up to this instruction 5 Click the large circle that surrounds the manipulator to display the rotate manipulators and then drag the green circular manipulator to rotate the angle of the extrusion to match the angle in the reference sketch (see image) and then drag the arrow manipulator a second time to extrude a second section of mesh.
The actual problem: On my scene, when I click the circle that surrounds the manipulator, the 3 axis' rotate handles appear,but they disappear as soon as I release the mouse button (It is the same behavior if I move and if I do *not* move the mouse before releasing).
it used to work fine. now, when i am using a light sample, and then move to a dark colored part of the image, and try to select a sample from there, i can't select a dark sample. when i try, i get the previous light sample. ??
I used to be able to clone stamp from a different image than the one I was working on. while using clone stamp I could hover over another image on the desktop, press the alt key and click, and then continue to clone the main image.
I double check that the layer in question is selected etc. but I just get a sort of no access symbol, a circle with a diagonal line across. I can clone okay within the same image but not from a remote one as I could before.
I am making a template file having title block with fields. I use this template for creating layouts and sheets using Sheet Set Manager and the fields will be updated from the data of SSM. Now i would like to add a dynamic north block to my template. The block could be rotated (i have this block in file itself) and rotation angle could be inserted. Now how can i add a custom field to SSM so that i could set a rotation angle for the project and thus every new layout or sheet created using the template has the north block rotated with the angle mentioned in SSM.
We have a drawing with multiple layouts and active viewports in them. For some reason we are unable to select some of the viewports so that we can resize them. we can see them we just can not select them. I do not see any settings that would affect this.
I checked to make sure the layers are all on and thawed - i am not able to see if the viewport is locked since I can not select it .
I am having a similar problema than Kari's except that in my drawing there are no Filters defined (it only says "All used layers" and that's it). I am using AutoCAD 2010.
The problem is that I can't select the viewport with the mouse cursor. I have to say though, that I can select them with QSelect.
Also different is the fact that I can see the border of the viewport, which is in the Defpoints layer, which is not frozen or turned off. In fact, none of the layers are frozen or turned off. It's only that I can't select it with the cursor. I can selct everything else in paper and model spaces
I have a North Arrow that I would love to make into a dynamic block. I would like to be able to rotate the N that represents where the north direction is. But while rotating the N around the center of a circle I would like the letter itself to stay un-rotated. It seems simple, if I rotate the letter around the axis of a circle 90 deg, I would like the letter itself to rotate -90 deg on it's own axis. Of course this is easy to do manualy, but how do i do it so that rotation 1 automaticaly triggers rotation 2?
I've been having trouble selecting more than one object with the pointer. the program was just reloaded on the computer, but this problem has happened multiple times now. everything will work fine for a while, then suddenly, when trying to select objects during a command, i can only select one. (ex. trying to copy multiple lines, i can only select one to copy at a time).
When I select an object to move I am unable to snap to the grips of the object or any other object close or any intersections. I have double and triple checked my osnap settings. Also, If I select a circle to move I am unable to select the center of the circle through additional osnap settings. One last issue, If I select an object and do a copy with base point command, I am unable to select a definitive base point. No grips or intersections show up.
My co-workers are able to do these functions but I am not.
I have a sketch with two circles.I'm placing an extrude the two sides go.I save the item and place it in a assy.Under Feature Priority I select Select Feature Priority.I select the item, right mouse click and want to select 3D Grips and want to use the component on both sides to extend.Only now it is not possible to select 3D Grips.
If I use the same sketch and I extrude one side then it is possible to use the 3D Grips to select the component to extend.
Suddenly I can only select one item at a time. If I move onto another item, the first one de-selects. I haven't knowingly made any changes. What has happened and how to put it right? I can select multiple items via 'click and drag', but only within one drag - another drag then de-selects the first drag again.