AutoCAD .NET :: Moving Group Of Entities From Point1 To Point2
Mar 9, 2012
which is the best way to move a group of entities (BlockReference) from one point to another? I have their ObjectIds in an ObjectIdCollection. Now, I don't know if there is a way to move all of them at once or if it have to be done for each one separately. How can I move and entity from point to point
View 2 Replies
ADVERTISEMENT
Feb 15, 2012
I have a lisp routing that the user has to use, to create a ucs, that is exactly on the front of the entity the user selects, so that whne they are drafting, labeling, dimensioningn the 3D entity, none of the drating lines are hidden when plotted.
The code is as follows:
(setq obj (vlax-ename->vla-object ent))
(vla-getboundingbox obj 'LowerCorner 'UpperCorner)
(setq LowerC (vlax-safearray->list LowerCorner))
(setq UpperC (vlax-safearray->list UpperCorner))
[code]...
Then I do a condition to see which points are greater than others, and move the ucs depending on the view to the foremost point. The program works perfectly.... however, often, they forget to use it.
I was wondering if I could incorporate it in another lisp that everyone uses, but not having the user pick the entity they want to be in front of (sometimes they pick the wrong entity). Instead, take the group of entities (anywhere between 1 to 30 per drawing (these are piping spools, so the entity count is not that great in model space)) and set a front working plane in model space. Working in paperspace is not an option, we're just too deep into our templates and processes.
I know there is a vmin and vmax, but they are for the X and Y axis, a VMax along the Z-axis would be great.
View 5 Replies
View Related
Jan 17, 2012
I am trying to create a selection set (or LIST) of all objects inside a unnamed GROUP.
I found a means to access the unnamed group, however I am having trouble creating the list.
Command: (entget (cdr (assoc 350 (dictsearch (namedobjdict) "ACAD_GROUP"))))((-1 . <Entity name: 7efe6280>) (0 . "GROUP") (5 . "130") (102 . "{ACAD_REACTORS")(330 . <Entity name: 7efe5c68>) (102 . "}") (330 . <Entity name: 7efe5c68>) (100 . "AcDbGroup") (300 . "") (70 . 1) (71 . 1) (340 . <Entity name: 7efe6268>) (340 . <Entity name: 7efe6260>))
In the example above, there are 2 entities in the group.
What I want to do is to remove a certain entity from the GROUP, then delete the entity.
Repeat until all entities of that type are removed (I can figure this part out...).
How do I create a Selection Set (or LIST) of all entities inside a GROUP?
To access the first GROUP name in the dictionary:
(cdr (assoc 3 (dictsearch (namedobjdict) "ACAD_GROUP")))
View 1 Replies
View Related
Apr 21, 2013
I'm having issues moving individual layers once they've been put into a group in CS5. It just moves everything in the group! Very inconvenient. This hasn't happened to me before or in CS6. How to correct this?
View 1 Replies
View Related
Jun 16, 2011
I suggest having the ability to group layers, such that operations performed on the group would act on all the layers in that group simultaneously. This would allow making a whole bunch of items (each on their own layer), then moving/re-sizing/whatever the whole group of layers.
View 2 Replies
View Related
Dec 6, 2013
Illustrator CC keeps crashing whenever I try to move a path or an object in a live paint group. I've tried it on other computers, but they seem to work fine. It seemed to only affect my laptop, so I'm not sure what happened. Restarting and updating it doesn't seem to solve the problem.
Here are the technical specifications for my Macbook Pro:
Mid-2009 Macbook Pro 15"
2.8 GHz model w/ SD card slot
Intel Core 2 Duo
Has Mavericks
4 GB of RAM
View 6 Replies
View Related
Nov 8, 2012
In CS5, you could move a group/layer/artboard along with all of the child objects, even if some of the objects are locked. But in CS6 the locked objects remain unmoved.
Is there a way to change this behaviour?
View 7 Replies
View Related
Apr 10, 2013
I have a project that was started by leaving all the survey data inside the "All Points" group. So, I'm concerned that when I enter my as built survey points, that even if I put them into their own group, that the original surface will still look at them and just rebuild to my asbuilt data, effectively cancel out the purpose of the asbuilt survey. Will this happen?
I want to take the original points and put them into a group of their own, but I don't know if that will affect anything or not? I have several wetlands already designed on that surface with volume calcs already done too.
What should I do?
View 9 Replies
View Related
Mar 19, 2013
One of my designers running 2012 AutoCAD and 2012 CADWorx, can no longer select individual parts of a GROUP by shift selecting the unwanted elements.
I have tried to modify..
Pickadd
Group
PickStyle
PickAuto
PickDrag
but to no success.
Also fiddled with her Options file, still nothing+
View 6 Replies
View Related
Apr 15, 2013
how to explode group when group name not found
View 1 Replies
View Related
Mar 22, 2012
I want to select part of an image with just one layer. Say I just flattened the image and have to move one part of. I select it with the rectangular select tool. It seems intuitive that I could then just move what I selected, but when I drag the selection, the selection itself moves without moving what is inside the selection.
If I then remember to click the move tool and try to move what's in the selection (seems to work sometimes, maybe when there's multiple layers?) the entire image moves.
The only way I can move part of the image over is if I make a selection and then cut it (ctrl X) then paste it.
How am I supposed to move part of the flattened image, is there a way I can set it to default to "When I select something, I can immediately drag that selected area around."
View 1 Replies
View Related
Nov 29, 2011
I have table, several chairs and some glasses and plates on table. I want to group them and instance that group, hundred of times. Problem is that I do not have materials implemented and I will not until client is satisfied with arrangement. I have problems later, even using many scripts I found, to add material to all instances. Only way is to select one by one.
Other thing is that there might be new objects added into set, so best way would be to add to master group and that will be added in instances of that group automatically, but that does not work with Maya.
View 4 Replies
View Related
Sep 23, 2011
looking for a way to read in the DXF data for a surface entity in AutoCAD2012. There's plenty on reading in simple objects (e.g. 3DFace, Points, etc.) but nothing on surfaces. The data itself is also not as intuitive as I would have hoped. The DXF reference PDF from AutoDesk shows 7 possible unique entries and the data I need is most likely stored in the proprietary data. So, in short I know where it is but how can I read it?
View 7 Replies
View Related
May 22, 2012
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.
View 2 Replies
View Related
Sep 8, 2013
I have the dialog window with the settings for entities graphical appearance used in my plugin.
My goal is to create the same preview as AutoCAD dimension style manager dialog has, the dynamic thumbnail of the entities while user changes the settings in dialog.
Probably one option is to create temporary block (created based on data from settings dialog) and then use BlockTableRecord.PreviewIcon, but I am not sure if there is some other way.
View 2 Replies
View Related
Oct 4, 2013
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.
View 1 Replies
View Related
Jan 3, 2013
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.
View 7 Replies
View Related
Oct 8, 2012
How to select all entites of a layer?
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
[Code].....
View 2 Replies
View Related
Nov 6, 2013
I have a requirement to find all connected entities on a given line of a plant P&ID. In other words given a certain line or reference point the requirement is to 'walk the line' and list off all entities (with certain attributes and in order) that are connected on a line.
Now not having any experience with underlying object models and API's, whether A) this is possible B) which object model to use - I'm a bit confused as to which one to use.
View 1 Replies
View Related
Feb 6, 2012
I received a drawing from an outside contractor that uses something with proxy entities. I can see them just fine on the screen but when I try to plot the drawing they disappear. It also came from a newer version so I had to use the DWG True View to convert it if that may have caused my issue.
View 5 Replies
View Related
Feb 6, 2013
I'd like to automatically hatch all visible polygons of a drawing. My vision of how to solve this is basically:
- for each visible drawing do
- pick internal point
- hatch
- end for
I'm having trouble by automatically picking an internal point inside the polygon.
I've found these two methods : Crossing numbers and winding numbers [URL]....... but they don't seem to work if there are some polylines inside an polygon.
Is there another solution to my problem for automatically picking an internal point inside a polygon ? Can I automatically hatch an polygon without picking it's internal point ?
View 5 Replies
View Related
Nov 27, 2013
My code takes the selected entities and reads out all the text of the attributes.
If no blocks are selected, the code prompts for a selection.
Unfortunately, by ending the transaction, the entitis are deselected.
So how to keep the selection, because it will be handled in a follow-up step.
Below a shortened code for the procedure:
private void Get_Text(){ Autodesk.AutoCAD.Internal.Utils.SetFocusToDwgView(); PromptSelectionResult sel = edt.SelectImplied(); if (sel.Status == PromptStatus.Error) { TypedValue[] auswahl_typ = new TypedValue[] { new TypedValue((int)DxfCode.Start, "INSERT") };
[Code] ......
View 1 Replies
View Related
Nov 26, 2012
I try to get all current entities for my own custom palette.
I tried it with ed.SelectionAdded and ed.SelectionRemoved but it doesn't work if I for example pressing ESC.
I want to get the Object Ids saved in a ObjectIdCollection and I don't want to run an autocad command every time.
View 1 Replies
View Related
Nov 24, 2011
I wrote a program that trys to move all the entities in a dwg file by calculating a grid transformation for each point in each entity. For example to move a pline
Case Is = "AcDb2dPolyline"
Set o2DP = oEnt
retCoord = o2DP.Coordinates
For j% = 0 To UBound(retCoord) Step 3
yaa# = retCoord(j%)
[Code]...
My problem is moving hatch entities. I haven't succeeded in finding equivalent code to move the hatch entities. I did find another post here, but I still don't get it.
View 6 Replies
View Related
Aug 23, 2008
Just a follow up to the inquiry on the Flatten command. Is there a way to use set all entities in a drawing to elevation 0? like moving them all to Z=0 like the flatten command but all entities in one command including blocks, hatches, etc.
View 9 Replies
View Related
Jan 16, 2012
I'm trying to make a curved wall with different heights, but i can't manage to do the loft of the object. I keep getting "The selected entities are not valid."
I tried remaking all the little polylines but nothing seems to work..
View 9 Replies
View Related
Jan 4, 2012
How can I trim entities in an array? I can make the array just fine, but I don't know why it won't let me trim them. I suppose it's trying to keep references to the array and the original entity that the array is based off of, but at this point I don't wish to keep that information.
View 5 Replies
View Related
Jul 12, 2013
I have some blocks which are placed with some routines in VB.net and are linked by a unique code to a external data file (XML-file). I want to try to created a kind of propertybox (in a toolpalette) which indicate some of this external data values. If one of these values are changed (by changing the values in the propertybox), some routines need to be executed.
Is it possible when a object is selected (not during a command), to run a piece of code (VB.NET). I have found some basic principles about "overruling" but I'm not sure this is the correct/possible way to solve the problem and I'm not there yet.
View 4 Replies
View Related
Nov 14, 2012
What i want to do is popluate a Listbox with with the area of previously selected Objects.This is what i have at the moment:
i = 0ListBox1.ColumnCount = 2For Each ssetOBJ In sset objarea = ssetOBJ.Area i = i + 1 With ListBox1 .AddItem .List(.ListCount - i, 0) = "Fläche" .List(.ListCount - i, 1) = objarea End With Next.
But the code only writes the area of the last Object in the first Row of the Listbox.I think in the FOR EACH Expression the variable "i" pass always "1" for the Row Number.
View 2 Replies
View Related
Oct 17, 2013
I'm try to set a classification for a list of objects with .net. I'va found some discussions regarding changing and iterating classification trees, but none setting the classification for entites, similar to selecting a classification in ui.
View 1 Replies
View Related
Feb 20, 2012
We're having a problem with Ordinate dimensions. When we dimension to a radius corner, we dim to the "implied intersection" of the two lines, rather than to the center of the radius. We make a sketch with the two "tick marks", then dim to the intersection of the tick marks.
Ordinate dimensions are not allowing us to pick the intersection: it wants to put two (or three) dimensions, one to each end of one or the other tick marks (see attached). We use Ordinate dims about once a year, but I'm sure I remember being able to ordinate dimension to the tick marks.
View 5 Replies
View Related