AutoCAD .NET :: Access Hatch Angle And Origins
Sep 30, 2011
I'm a vb.net developer and i've a project to do for my job (my company is building laser machines). So i have to use autocad for drawing and, inside autocad, add a vb.net project to transfer all coordinates to a laser.
There's no problem for the most of object, but i've some difficulties with the hatch. I explain.
I can get the coordinates for hatching with the " . explose " (it gave me lines and after that, i can have all the points x and y)
But i need to "Rotate the hatch" (for making some sorts of holes in metal by example)
(Ex : Hatch angle start at 0 degrees, then 45, then 90, etc... etc...)
How can i rotate this hatch in vb.net ? (The hatch must not change on the autocad screen, so i use a clone for getting lines). I've find a method for getting the pattern angle (ex : MyHatch.patternAngle) but it returns me strange angle (like 0,00812 etc...)
And a other problem is that the origins of hatch angle seems based on 0,0 (so, when i change angle, it change from 0,0 and not the center of the Hatch)
View 2 Replies
ADVERTISEMENT
Oct 18, 2012
I have a simple brick like hatch that is set to have a full tile at the origin of the hatch. All is well when the hatch is horizontalbut when the hatch is rotated within the hatch edit box it loses the origin and it won't set with a full tile.
How can I get the origin to be the same at any angle and the hatch start with a full tile????????
View 9 Replies
View Related
Jul 15, 2013
How to access the color for a particular hatch within a drawing using iLogic.
I would like to color the hatching for parts based on paramaters besides material.
ie.
Purchased parts = Green Hatch
Refrence = Grey Hatch
I would hope one could loop through the views looking for hatches, and once found, check the part they are associated with, then based on an "if then, change the hatch color and move on to the next pattern.
View 4 Replies
View Related
Jul 15, 2013
How do I get at the hatch objects within a drawing using iLogic?
I would like to be able to customize hatch color based on various part properties.
ie:
Purchased part = Green Hatch
Refrence = Light Grey
and much more
This would be possible if I can get to the hatch object and determin what part it is associated with.
I only see iLogic code that allows you to change visibility of all hatching, and set general hatch angle.
Since I can select a hatch in the drawing and change its color, I assume there is an un-published API object that relates to hatches
View 3 Replies
View Related
Jan 12, 2012
Is it possible to have the origin (or workpoints, planes, axis) of each view to show up when a IDW is exported to a DWG? They show in the IDW but not in the DWG.
View 2 Replies
View Related
Aug 10, 2013
I'm on inventor 2012 and I've not used it in a whlie. I thought I remembered in an assembly there was an origin indicator for each part in an assebly or a way to turn it on. I know I can turn planes and axes on in the origin folder but it would be quicker to just glance at a triad at the part origin. There's a similar command in MAYA called display local rotation axes.
View 4 Replies
View Related
May 22, 2012
Is it possible to change the artboard origins to always be 0,0 (top left corner), and not relative to the first artboard in a document?
View 5 Replies
View Related
Oct 15, 2008
Im drawing in isometric view and want to change the default drawing angle from 30 degrees to another angle.
View 9 Replies
View Related
Oct 5, 2011
Is there a quick way to rotate an object to match an angle without knowing what the angle is? I am using AutoCAD 2011 now. I was using 2007 and I had an add on command the would rotate an object using a base point and picking the two lines that make up the angle, and it would match the angle you wanted. I can not get that command to load in 2011.
View 4 Replies
View Related
Jul 25, 2012
I have a property line that is N 36d19'52" E but needs to be N 12d52'18" E. The obvious and calculated rotation angle would be 23d27'34" but when I rotate the line by the calculated angle it doesn't rotate to the right angle. It's off by 0d11'10"!? When I draw a line by bearing at N12d52'18" E and inquiry the angle between the property line and the drawn line the angle difference is in fact 23d27'34".
View 1 Replies
View Related
Feb 11, 2011
Let's say I am inserting a square block into a dwg and want to get it parallel to an existing angled line. Do I have to read the angle of the line and insert the block to that angle or is there a quicker way?
View 6 Replies
View Related
May 26, 2013
I have used a driven contraint in a sketch.
Can that also be done in an assembly?
In one assembly I want to make one angle half of a driven angle.
View 3 Replies
View Related
Jul 6, 2013
how to convert "real world" angles of elliptical arcs into those shown in a dxf file?
Say that I have drawn an elliptical arc with its start angle on 210 degrees and an end angle of 324 degrees. The values in a DXF file, for an elliptical arc, have something to do with the contant "PI" (3.14159). I know that a full circle is 2*Pi but how to do this with elliptical arcs!!
View 1 Replies
View Related
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
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
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
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
Apr 26, 2012
Just loaded 2013. Of course right away I get an error. "Internet access is required to access the Help" Well as you can see I have internet access.
View 4 Replies
View Related
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
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
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
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
Nov 13, 2013
Is there a shortcut to draw a 45 or 90 degree angle from a drawn line on an angle using the pen tool? ie. Rather than just from the x and y axis.
I trace a lot of maps and site plans.
View 19 Replies
View Related
Nov 19, 2012
I would like to draw a smiple line using the transparent command 'AD (angle-distance).
My distance is not horz., so I want to enter the Vertial angle and the slope-distance, in LLD the command was AD VD.
So how do you do this in Civil 3D 2012.
View 1 Replies
View Related
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
Aug 31, 2008
Opening credits for my Photoshop Elements 4 refer to a Thomas Knoll. I've been quite curious about whether he was the same sharp young engineer I worked with earlier.
Now PC Worlds 25th anniversary issue refers to Thomas Knoll launching Photoshop on Feb 19, 1990.
So now Im even more curious about whether he's the same Thomas Knoll I worked with at Honeywell in suburban Minneapolis in the late 1980s. I wondered what had become of him.
View 3 Replies
View Related
May 24, 2011
How can I get the angle of a line as shown in the picture?
if (obj.GetType() == typeof(Line)) {
Line linha = (Line)obj; double angulo = linha.Angle;
Point3d startPoint = linha.StartPoint; Point3d endPoint = linha.EndPoint; }
For in my code I techo angle value in double. Could any method return the integer value of the angle?
View 8 Replies
View Related
Aug 19, 2013
how to Translate WCS coordinates to PSDCS? where can find the C# code?
View 2 Replies
View Related
Dec 13, 2011
I have derived an angle from an entity in UCS. how to convert this angle to the correct angle in WCS?
View 6 Replies
View Related
Aug 10, 2011
II am looking for two things...
1) A good explanation of Vector3d. I have been unable to find a good explanation in the ARX documentation or on the online .Net developers guide.
2) Need getting the angle between two lines. The lines in question are in an orientaion similar to the greater than operator ( > ). I have attempted to use the Vector3d.GetAngleTo method to get the angle, but I do not understand it enough to be successful!
View 3 Replies
View Related
Jun 3, 2011
A question regarding converting angles between co-ordinate systems in AutoCAD .NET.
Im creating my first little utility to form selected block attribute references into a nice neat list. The current version takes a selection of blocks and a list insert location and then moves the attribute references to the location and rotates them to WCS angle of 0.
I now want to expand the program to make it a little more flexible and allow you to form the list parallel to the currently selected UCS x axis (the i.e. and angle of 0 in relation to current ucs's).
I have managed bumble my way through and transform the attribute positions correctly to form a list relative to the current UCS but am strugling on how to work out in code what the equivlanent WCS angle value would be.
I have done some calcs using .net framework to calculate an angle between two vectors (see code extract below). But this introduces a small error into the angles (i.e. if my ucs is set rotated 45 degrees around the zed and i use the below maths, the resulatant angle is 45.0000002 when read in acad afterwards).
Matrix3d ucsCur = ed.CurrentUserCoordinateSystem;
CoordinateSystem3d cs = ucsCur.CoordinateSystem3d;
// the below seems to work by calugulating the angle between two vetrex using .net maths class but this introduce a small accuracy error. Is there a better way?
Double rotAngle = Math.Acos((1 * cs.Xaxis.X) + (0 * cs.Xaxis.Y) + (0 * cs.Xaxis.Z));
//set the attribute reference rotation to the calculated WCS radian rotation value "rotAngle"
attRef.Rotation = rotAngle;
Im sure there is a better way built into the managed autocad wrapper using a tranform matix and the ucs vertex information but dont really know how to go about it. Any links explaining how to work with the UCS in .net.
View 3 Replies
View Related