AutoCAD VB :: How To Move Hatch Entities

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


ADVERTISEMENT

AutoCAD .NET :: Hatch All Visible Entities

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

AutoCad :: Hatch Sections Of (overlapping) Entities?

Dec 24, 2013

I'm working through a tutorial on [URL] drawing and attempting to hatch the second Extra Practice assignment at the bottom of that page: [URL] I've drawn it from a closed polyline with a circle overlapping it but I'm not sure how to assign different hatches to each of the six sections as shown in the second link above. I've tried opening the hatch dialog, selecting the polyline and choosing points, but I can't get there. I exploded the polyline into lines and tried selecting points again, but no good. I tried selecting the entire (unexploded) polyline, but I can't assign individual different hatches to each section - I just get the usual all/in-out, etc. behavior. I assume I could manually construct entities to match each section, but that gives me the same bad vibes as using goto when programming. Just doesn't seem right.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Copy / Move All Entities In Two Coordinates

Jul 16, 2013

I am having nearly 1000 drawings where I need to change the title block in a new format.

I am stuck up in moving all the entities  in  cordinates 15,280 (upper point) and 205,55 (lower Point) to 275,294 (upper point and correspoing lower point.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move UCS To Front Of All Entities In Model Space

Jul 9, 2013

I have code that will set and sae a current UCS to the front of an entity, of course, depending on the viewpoint.  This is so, because we need all draft lines in front of 3D solids, such as dimensions, leaders for labels, text entities and so on (the reason for not putting these entities in paper space is another discussion ).

But I'll have on of two problems on numerous occasions:

1. The user forgets all together to run the command.
2. The user will pick the wrong entity that is in the foremost position in that view.

The code I have utilizes the following:

(setq ent (car (entsel)))

(vl-load-com)
(setq obj (vlax-ename->vla-object ent))
(vla-getboundingbox obj 'LowerCorner 'UpperCorner)
(setq LowerC (vlax-safearray->list LowerCorner))
(setq UpperC (vlax-safearray->list UpperCorner))

Then I'll analyze the X, Y and Z of both the lower and upper corners, and set my UCS to whatever is proper.

Is there a "LowerCorner" and an "UpperCorner" for all entities.  I can't see "VSMIN" and VSMAX" working because the elevation of the returned coordinates is always "0,0"

View 4 Replies View Related

AutoCAD 2010 :: Hatch Unable To Move / Copy To New Location

Aug 2, 2013

I could not move or copy the hatch,it seems like locked. The dxf drawing was exported from CSC OrionR18.

View 5 Replies View Related

Revit :: Move Horizontal Hatch Lines So They Align With Top Of Windows

Sep 7, 2013

I want to move my horizontal hatch lines so they align with the top of my windows.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Entmake A Hatch Entity From A Hatch Template?

May 2, 2013

I am trying to entmake a hatch entity from a hatch template.

After entget the template hatch entity, i get the followings

Select object: ((-1 . <Entity name: 7ed11b78>) (0 . "HATCH") (330 . <Entity
name: 7efc7c10>) (5 . "737") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
"SECTION-LABEL") (62 . 255) (100 . "AcDbHatch") (10 0.0 0.0 0.0) (210 0.0 0.0
1.0) (2 . "SOLID") (70 . 1) (71 . 0) (91 . 1) (92 . 1) (93 . 8) (72 . 1) (10
633596.0 5.79713e+006 0.0) (11 633519.0 5.79713e+006 0.0) (72 . 1) (10 633519.0
5.79713e+006 0.0) (11 633519.0 5.79708e+006 0.0) (72 . 1) (10 633519.0
5.79708e+006 0.0) (11 633500.0 5.79708e+006 0.0) (72 . 1) (10 633500.0

[code]....

Now I  wrote the following code using the above data as follows

(entmake (list (cons 0 "HATCH") (cons 67 0) (cons 410 "Model") (cons 8 "SECTION-LABEL") (cons 62 255) (cons 10 (list 0.0 0.0 0.0)) (cons 210 (list 0.0 0.0 1.0)) (cons 2 "SOLID") (cons 70 1) (cons 71 0) (cons 91 1) (cons 92 1) (cons 93 8) (cons 72 1) (cons 10 pt1) (cons 11 pt2) (cons 72 1) (cons 10 pt2) (cons 11 pt3) (cons 72 1) (cons 10 pt3) (cons 11 pt4) (cons 72 1) (cons 10 pt4) (cons 11 pt5) (cons 72 1) (cons 10 pt5) (cons 11 pt6) (cons 72 1) (cons 10 pt6) (cons 11 pt7) (cons 72 1) (cons 10 pt7) (cons 11 pt8) (cons 72 1) (cons 10 pt8) (cons 11 pt1) (cons 97 0) (cons 75 0) (cons 76 1) (cons 98 1) (cons 10 (list 0.0 0.0 0.0)) (cons 450 0) (cons 451 0) (cons 460 0.0) (cons 461 0.0) (cons 452 1) (cons 462 1.0) (cons 453 2) (cons 463 0.0) (cons 63 5) (cons 421 255) (cons 463 1.0) (cons 63 7) (cons 470 "LINEAR")))

The point variables pt1, pt2....pt8 are all defined. But when I run the code the hatch is not being created? Why?

View 1 Replies View Related

AutoCad :: Change Hatch From ANSI31 To GRAVEL Some Of Hatch Shows Outside Boundary

Aug 24, 2011

I have a hatch (ANSI31) enclosed by a closed polyline. Whenever I change the hatch from ANSI31 to GRAVEL some of the hatch shows up outside the boundary. The Polyline consists of both arcs and line segments, and the hatching errors are occurring within the radius of the arc segments. Changing it from Associative to Non Associative makes no change.

I am using AutoCAD 2011.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automatically Pick Up All Hatch And Solid Hatch Patterns

Aug 6, 2008

I am in need of a lisp routine which will automatically pick up all hatch and solid hatch patterns within a drawing and change the colour to colour 254.

View 9 Replies View Related

AutoCAD 2010 :: Open Hatch Edit Dialog With Double Click On Existing Hatch?

Apr 17, 2010

It is no more possible open Hatch Edit dialog with double click on existing hatch. Now, this way opens only Properties

View 9 Replies View Related

AutoCAD 2013 :: Missing Hatch Patterns In Hatch Library?

Jan 2, 2013

Just downloaded Autocad 2013 and am missing quite a few of the standard hatches (siding, soldier, board and batten, etc.) What should I do to get them back.  When I open old drawings with these hatches in them, they load just fine...but I am unable to hatch any new areas with these hatches (because they are not listed in the hatch library) 

View 9 Replies View Related

AutoCAD .NET :: Block Reference Hatch - Deleting Loops Within A Hatch

Feb 22, 2013

I want to be able to add a Block Reference to a hatch. I'm adding the block reference to an ObjectIdCollection and the hatch is not taking it when using AddLoop().

So I thought maybe I needed to add the location of the polyline (curve-like) object that is member of the blockreference to the hatch, but I don't know how to get its ObjectId.
 
Hatch thisHatch = new Hatch();thisHatch.Layer = layerName;thisHatch.SetDatabaseDefaults();thisHatch.SetHatchPattern(patternType, patterName);thisHatch.Color = Color.FromColorIndex(ColorMethod.ByColor, colorIndex);thisHatch.Transparency = new Transparency((Byte)(255 * (100 - 60) / 100));tSpace.AppendEntity(thisHatch);transaction.AddNewlyCreatedDBObject(thisHatch, [code]........

Also, I'm trying to delete certain HatchLoop that is associated to a polyline but I don't know how to do it. I'm going through the loops in the hatch but I don't know what to do there. I wanna do this so I create a new and different hatch on top.

I think one could also copy all the loops except the one one wants to delete, but I'm not sure how to tell which one is the one I want to delete that is the one associated to a polyline or that is in certain region.

View 1 Replies View Related

AutoCAD LT :: Hatch Button Does Not Activate Hatch Dialog Box

Dec 17, 2011

I have AUTOCAD LT 2012 - windows 7 - SP1

Neither the button for Hatching or the Draw Hatch menu do not activate the HATCH DIALOG BOX?

This means I cannot Hatch?

I have also added the Hotfix for the Ribbon and it made no difference.

View 6 Replies View Related

AutoCad 2D :: Hatch Command To Match Existing Hatch

May 6, 2013

I've migrated from 2005 to 2014 LT and wondered if they have added to the hatch commands. I've looked and haven't found anything. Is there a command that you can pick a hatch pattern already shown on the drawing and make that pattern the existing one to use? I sometimes have multiple hatch patterns and scales, and wanted a quick way to go from one to another without lisp help.

View 3 Replies View Related

AutoCad :: Why Is Hatch Offset From What Want To Hatch

Feb 11, 2012

Why is my hatch off set from what I want to hatch? I pic the points of the area in 3d i want to hatch but it ends up hatching out of the points i select?

View 5 Replies View Related

AutoCad :: DXF And Surface Entities?

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

AutoCAD .NET :: How To Get ObjectIdCollection Of All Entities In A Certain Layer

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

AutoCAD .NET :: Dynamic Preview Of Entities

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

AutoCAD .NET :: Select Entities By Extent?

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

AutoCAD .NET :: Select Nested Entities

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

AutoCAD .NET :: Select All Entities Of A Layer?

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

AutoCAD .NET :: Find All Connected Entities?

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

AutoCAD LT :: Plotting Proxy Entities

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

AutoCAD .NET :: Entities Deselected - How To Keep Selection

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

AutoCAD .NET :: Getting Current Selected Entities

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

AutoCad :: Use Entities In A Drawing To Elevation 0

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

AutoCad 3D :: The Selected Entities Are Not Valid

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

AutoCad 2D :: How To Trim Entities In Array

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

AutoCAD .NET :: Selecting Blocks / Entities

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

Photoshop :: Can't Move Just The Layer I'm Trying To Move With Move Tool

Dec 1, 2006

I try to select and move a layer using the Move Tool, another layer is immediately selected and moved instead.

Also, if I have layers inside a folder and try to move one of those layers, the entire folder is selected and all layers within that folder move.

I have not grouped any layers together.

I'm using Mac OS 10.4.8 with PS 9.0.1

View 3 Replies View Related







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