AutoCAD .NET :: How To Test For Existence Of Self Intersecting 2D Polylines

Apr 8, 2011

Im trying to write a routine in VB.net based on Fenton's examples from 'Zero to 3D in 60 Minutes'. the routine uses a filter set to select all 2D polylines in a document then a test is needed for each polyline to establish whether it is a loop, which can then be extruded into a solid or it is a non loop, where the operation will need to be an extruded surface, or if the polyline is a non-loop.

So far my code will pick up every 2D polyline and try and extrude it, but i need to catch the non-looped entities to handle them with an extrude surface method or if self-intersecting polylines, to either drop them and not cause an exception or process them in another way.

What entity attributes or methods should I use to perform testing to establish this loop and non-loop existance of the polylines to achieve this. I work with both C# and VB.net.

View 1 Replies


ADVERTISEMENT

AutoCAD .NET :: Getting Intersecting Point Coordinate Of Two Polylines (lines)

Jul 12, 2012

I wonder if there is a way to get an intersecting point coordinate of two polylines(lines) programmatically.

For example, like in the below sample picture, I need to get coordinates of the points in the red cycles. 

Is there any method that I can easily use?

Could I get a sample code snippet that computes the coordinates? (in C# & ObjectARX 2010 if possible?)

I've looked up "Through the Interface" and this disscussion group. couldn't find any useful yet.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Sub Areas From Intersecting Polylines

Oct 17, 2011

Essentially, I'll be creating a sort of Venn diagram.  So for the purposes of this exercise, let's assume it's the classic Venn diagram of three intersecting circles.  But I need this to work with closed polylines, that may also have arc segments in them.

Anyway, so I have these intersecting areas, and I need to create bounding polylines for each area, and assess the number of overlaps.  So, as in a Venn diagram, the areas where only one circle is present can then get shaded one color, areas where two circles are overlapping can get a different color, and the area where all three circles overlap can get a third color.

I'm clearly going to have to be converting the various boundaries to Regions, and performing some Unions.  It seems I could grab all objects, convert them to Regions 2 at a time, and compare their Union'ed area to their individual area, to determine if they overlapped at all.  With only the 3 cirlces, that would work, but when I have 35 individual polyline areas with arcs, suddenly this method feels like it will break down.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Determine Existence Of Entity

Oct 10, 2013

I have a specific need to determine if an entity is existing or not so that I can either make changes to or create the entity. I'm trying to do this while referring to the entity by it's handle. Below is my code this far but it doesn't work.
 
(IF (AND (SETQ HNDL (VLAX-LDATA-GET "TB" (STRCAT PLN "PLAN"))) (NOT (VLAX-ERASED-P (VLAX-ENAME->VLA-OBJECT (HANDENT HNDL)))) ) (PROGN ;;| DO SOMETHING WITH THE EXISTING ENTITY ) (PROGN ;;| MAKE THE ENTITY
(vlax-ldata-put "TB" (strcat PLN "PLAN") (CDR (ASSOC 5 (entget (entlast))))) ))

I ran the program and the handle was stored, then I deleted the entity and ran the code again and this is the error I get:

; error: unable to get ObjectID: nil

This VLISP stuff sometime has unpredictable hoops to jump through first, so I wondering if this is the case here.

View 3 Replies View Related

AutoCAD 2010 :: Converting Polylines With Width And Text Into Close Polylines

Jan 2, 2014

As the above mentioned, I have a drawing drawn using polylines with width from someone. The width of the line are suppose to represent area,

To put things into prospective, here is an example:

The polyline is 10 unit long and with a width of 2 unit wide. If i explode that polyline, it will become a single polyline without width. The line are suppose to represent 10 unit long and 2 unit wide; representing an area.

My question is is there a way to change the line above directly from polyline with width to a close polyline (4 x polylines) of 10 unit long and 2 unit wide.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Checking For Existence Of Drive Using Code Not Working?

May 2, 2013

I'm trying to check for the existence of a drive using lisp, then if not found perform a task (represented in my below example by the alert)

(if (vl-file-directory-p "C: en") T)(alert "exists"))

 I know it doesn't work because if I change the T to nil as demonstrated bellow I should invoke the opposite reaction from autocad but instead I get the exact same outcome which is an alert telling me the file exists?
 
(if (vl-file-directory-p "C: en") nil)(alert "exists"))

View 7 Replies View Related

AutoCad :: How To Draw 3D Polylines Or Convert Single Lines To Polylines

Oct 9, 2013

How to draw 3D polylines, or convert single lines to polylines?

this.JPG

View 7 Replies View Related

AutoCad :: Converting 3D Polylines To Polylines With Elevation?

Jan 20, 2006

Is there a way of converting 3d polylines to polylines with an elevation?

I have a dwg of contour information, the contours are 3d polylines, because they are contours the z value is constant all along the line, so there no question what the elevation of the polyline would need to be.

I need to do this as I then need to import the dwg into a GIS programme called MapInfo whch doesn't read 3d polylines.

I have access to AutoCAD 2004 or 2005LT.

View 9 Replies View Related

Illustrator Scripting :: How To Check For The Existence Of XML Files

Mar 8, 2013

I'm writing a Javascript to run at startup. I want to check for the existence of XML files and process them, if they are available. How can I check for their existence?

View 6 Replies View Related

AutoCAD .NET :: Test For WorldUCS Not Working

Nov 18, 2013

I normally get the UCS directions as part of a test to see if current coord system is same as world:

I am seeing a nonnormal UCSxdir and Ydir for several drawings with UCS I know is on world. See the above value.

It took me a while to realize it was because the drawing had ps viewports, and the viewport UCS was user.

How would I get what I would call "the modelspace current coord system info" to do this test.

I am doing this with a drawing not open in the editor, it is DBX style. If it was not, I could do all kinds of things to figure out if modelspace was on world ucs.

[URL] ........

View 1 Replies View Related

AutoCAD VB :: Test To See If Drawing Is Open Using VBA

Feb 22, 2005

how to test to see if a drawing is already open inAutoCAD using VBA and if it to make it the active document?I have a VBA macro to open xrefs by by just picking them in the drawing butI need to test to see if the drawing may already be open to avoid openingthe drawing a second time in "Read Only" mode.

View 9 Replies View Related

AutoCad 2D :: Hidden Linetypes With Test

Feb 25, 2013

I am just starting to create some custom linetypes. All is well with solid lines with text. However I have reached a stumbling block as far as hidden lines go.

Basically I get this result -----x-----x-----x-----x-----x-----x-----x-----x-----x
But I am looking for this --------------------x--------------------x--------------------

Not sure how to do this as I get an error message saying that I can only have 12 dash/dot entries before the text.

The plumbers in our don't want to see text that often.

View 4 Replies View Related

AutoCAD Civil 3D :: Two Intersecting Alignments

Jun 8, 2012

How do I project the Proposed Road Level information from Road_1 at the intersection of Road_2 (Alignment_GA.jpg) onto the Start of the Profile for Road_2 (Alignment_Profile.jpg) to give me my tie in start point?

How do I obtain the exact change of the intersection Point? How can i extend Road_2 onto the horizontal curve of Road_1 so i know they exactly intersect?

View 1 Replies View Related

AutoCad 3D :: Self Intersecting Surface While Sweeping

Dec 12, 2011

I am trying to create a CAD drawing for the construction of Paddle Pop sticks. It is the basic shape of the Magnum sticks, but it is tricky because it has a 140 diameter taper, from the top of the jig to the bottom. I am trying to make the circle attached to the shape of the stick, and the Sweep the circle around the shape. But when I try to sweep it around, it says "The sweep results in a self-intersecting circle". I am using AutoCAD 2012.

P.S. I have attached the .dwg file so that it makes more sense.

View 3 Replies View Related

AutoCAD Inventor :: Simulating Tensile Test

Jul 11, 2012

Is there a way to simulate a simple tensile test in autodesk inventor. Let's say I draft up a 1" x 1" x 10" bar. If I input all of the material properties such as yield strength, tensile strength, % elongation etc., is there a way that I can simulate a simple uniaxial tension test on this bar? If so, how do I set it up with the autodesk simulation engine?

View 6 Replies View Related

AutoCAD LT :: Test Displays At Incorrect Size

Mar 21, 2012

Text is displaying at the incorrect size in both paper space and model space. It seems that there may be some kind of global scale factor in action e.g. if I add text at size 2.5, it displays at size 2.25 and if I add text at size 1.8, it displays at size 1.62.

How do I set so that text is displayed at the correct size?

View 5 Replies View Related

AutoCAD Civil 3D :: Surface Intersection Test?

Nov 28, 2013

I have a link starting from P1.Is there a way to check if the link is intersecting EG or not?

Civil 3D 2014 x64
Windows 7 64-bit
16GB RAM

View 2 Replies View Related

AutoCAD .NET :: Test For Duplicate Handles In A File?

Dec 3, 2013

How would I test for duplicate handles in a file. If I select a cirlce from an xref and it has a handle of "E6" Then I select another circle from a different xref that has the same handle. When I use GetObjectId how do I specify which handle? Is there a way to give a handle and a file path and have it point to the correct entity or would I need to cycle through all entities and check for matching handle and file name?

In the end I would like to select an object, then store that data in a file and then recall that exact same object later.

View 6 Replies View Related

AutoCAD .NET :: How To Test Model Space / Paperspace

Jul 14, 2010

I am currently using the following to switch to modelspace:
 
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;ed.SwitchToModelSpace(); 

However if you already are in modelspace it throws the error: eInvalidInput

How do I find out which space I am in so I can avoid running this when already in modelspace?

View 3 Replies View Related

AutoCad :: Cyclone Simulation Test On Switchboard?

Sep 23, 2011

I would like to know the Cyclone simulation test on the switchboard?

Can it be done in Autocad 2012? What kind of software needed?

View 9 Replies View Related

AutoCad :: How To Test Block To Check All Necessary Constraints

Nov 24, 2013

I'm testing out a simple Block Table in the Dynamic Block editor and when I go to save the Block, the following alert pops up. Is there a way to "test" the Block to check all the necessary constraints? Or am I just suppose to go about this with good 'ol fashioned trial and error? Seems the block is working just fine so is the alert just a moot point?

fully_cons.PNG

View 4 Replies View Related

AutoCAD Inventor :: Combining Intersecting Parts

Apr 7, 2004

I am trying to modify a hoop instead of having a half circle, i half to cut the hoop short and add a flange, instead of starting over, is there a command I can use that I can create a flange and join the hoop and flange at the intersect..... the hoop was made using the fold feature...

View 9 Replies View Related

AutoCAD Map 3D :: Intersecting GIS Parcel Data With An Alignment ROW

Jul 28, 2011

I am a beginner with AutoCad software, and I am currently using Civil 3D/Map 3D 2009.I imported a shp. file containing property information (owner, area, address, etc), and also imported an alignment row as a sdf. file. The row is a closed polygon.

My goal is to intersect these two types of data so that I end up with information on the number of properties affected by the row.

Is civil 3d 2009 capable of doing this? If so, how? I found a youtube video on using the 'Offset Alignment' command with Civil 3D 2010, however, is not the same for 2009. 

View 6 Replies View Related

AutoCAD Inventor :: Split All Intersecting Surfaces

Feb 7, 2013

is there a command or workflow to split all intersecting surfaces?  currently we build surface models and split manually or open in autocad, explode, overkill, breakall, then export the lines for rebuilding in an FE package.

Ideally we would like to export straight from inventor with one hit i would like to do the 5 splits below the EOP marker automatically

View 9 Replies View Related

AutoCAD Inventor :: Split All Intersecting Surfaces?

Feb 5, 2013

is there a command or workflow to split all intersecting surfaces?  currently we build surface models and split manually or open in autocad, explode, overkill, breakall, then export the lines for rebuilding in an FE package.

we would like to export straight from inventor with one hit

View 4 Replies View Related

AutoCAD 2013 :: Self-Intersecting Curves For Extrusion

Oct 31, 2013

I have been working on this project for awhile, trying to get it to extrude.  The top drawing of the shape is when I created it, still as lines and arcs.  The bottom pices are what I have broken it into and joined as polylines for extrusion.  The top most piece of these is the one I have been working with, with no solution found.  The 3 smallest of these pieces do extrude, but I need all of them to extrude as they are all different heights.

Once this extrusion problem is solved, the rest is just unioning it together and to the rest of my project.  I have tried exploding them, overkilling them and joining them again, I have tried the boundary method I have found on forums, nothing is working.  I have gone through with a fine tooth comb on the top most section and made sure there wasn't anything extra.  I have tried using pedit on it, and many of the commands say you can't do this on a closed polyline.  If its a closed polyline, why won't it extrude?  I could find anywhere where it was "Self intersecting curves" like the error says when I try to extrude it.

View 5 Replies View Related

AutoCAD Inventor :: Cut-outs For Intersecting Components?

Apr 9, 2013

I have a rectangular chute, tapering in width and height, and intersecting, at an angle, with a round duct. I can't seem to find a way to determine the cut-out in the round duct.

Because the chute tapers projecting the size onto a flat plane to then project onto the round duct doesn't work.

View 4 Replies View Related

AutoCad :: Compare Two DWG Files As A Part Of GUI Test Automation

Feb 16, 2007

I am working on an AutoCAD OEM based product. I need to compare two DWG files as a part of GUI test automation. What is the best way to do it?

I have already explored Compare DWG, a third party tool available as a Menu option in AutoCAD. However, the ObjectARX library used by this tool does not get loaded onto the product under test. It gives a linker error as follows:

AcRxDynamicLinker failed to load 'C:Program FilesFurixCompareDWG 2006frxc2006_calc.arx'

View 7 Replies View Related

AutoCAD Civil 3D :: Match Daylighting Between Intersecting Corridors?

Jun 18, 2013

I have a main road corridor and a small access road corridor that intersects the main road. I don't want the intersection to have curb returns because I just want the access road to act as a driveway enterance (main road curb will run straight through and just get depressed at the access road enterance). However, I want the daylighting for the main corridor and the access road corridor to match up at this intersection and I'm not sure how to do this.

View 6 Replies View Related

AutoCAD Civil 3D :: Display As Intersecting Line When Zooming In

Sep 16, 2011

Lets say you have a polyline snapped perpendicular to an acr and you start zooming in they tend to separate. In the past a simple regen would magically make them display as intersecting lines (no gap or overlap). Right now the regen isn't working and I can't figure out why or what changed. I tried changing the VIEWRES but that didn't seem to work. What else could it be? I don't even have to zoom in that far to notice the overlap.

Infrastructure Design Suite 2014
Civil 3D 2013 sp2
Windows 7 x 64, 16 GB
Intel Xeon @ 2.80 GHz
NVIDIA Quadro K2000

View 3 Replies View Related

AutoCAD Inventor :: How To Find Intersecting Points On Cylinder

Jan 7, 2014

I'm trying to find the intersecting points of a part that connects to the outside surface of a cylinder shaped part.

What is the best way to go about this? I have attached some images that hopefully illustrate my problem.

View 1 Replies View Related







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