AutoCAD .NET :: Know A Polyline Is Closed Or Not?
Jul 3, 2012Is there a methoed or trick to realize a polyline is closed or not?
View 3 RepliesIs there a methoed or trick to realize a polyline is closed or not?
View 3 RepliesI have used PEDIT to join multiple polylines, which now appear as polylines. But when I use QSELECT to show all open (non-closed) section, one polyline still shows up as open.
I've attached the file I'm working on. The polyline in question is the green outline on the object on the right.
I have closed polyline:
Polyline rectangle = new Polyline();rectangle.AddVertexAt(0, rectangleTopLeft, 0, 0, 0);rectangle.AddVertexAt(0, rectangleBottomLeft, 0, 0, 0);rectangle. AddVertexAt(0, rectangleBottomRight, 0, 0, 0); rectangle.AddVertexAt(0, rectangleTopRight, 0, 0, 0); rectangle.Closed = true;
How can I make it like a hatch(to fill it up)?
Is there a command or lisp that will allow you to select a closed polyline and trim everything outside of it even if the items are blocks that aren’t exploded?
I’ve tried EXTRIM but that fails on blocks.
When I try to extrude this closed polyline (yes it is closed) I get the message "Cannot sweep or extrude a self-intersecting curve." I do this sort of extrusion all the time (closed polylines with various geometry) and usually have no trouble.
View 9 Replies View RelatedI've been using the admittedly pieced together code in order to insert border blocks around a closed polyline. Yhe problem I'm having is that when the Block angle is say "zero" the block is inserted the same way both on top and below the polyline. Since the blocks surround the polyline the blocks on the downside should have an additional 180 degree rotation. How to deduct that the portion of the polyline is in a certain quadrant and adjust the insertion angle as necc? I 'm not sure thats even the best approach.
Dim pso As PromptStringOptions = New PromptStringOptions("Enter name of block to create reference: ")
Dim pr As PromptResult = myEd.GetString(pso)
Dim blkName As String = pr.StringResult
'If (!bt.Has(blkName)) Then
[Code] ....
I have a method for inserting a vertex to a polyline. But this does not work for closed polylines for the case shown below. The code fails if the point is on the last edge of the polyline.
public void AddVertexOnPolyline(Point3d addPoint,Polyline editPolyline) { Document acDoc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocu
[Code].....
Is there a way to select objects within a closed polyline? I thought there was but I can't remember how to do it.
View 2 Replies View RelatedPresently the "AREA" of a closed polyline is in "sq-in" first, THEN "sq ft".
For everything I do, and likely others, I need sq ft - without having to waste time and roll my cursor over the results.
Is there ANY way to change this default to have sq ft FIRST!??
I was wondering if there is a settings for the displayed values in a polyline's properties. Such as area. Normally it will display square feet but I would like for it to also display acres. I know it a simple conversion, but over the course of a year or more it could save me alot of time.
View 2 Replies View RelatedI need a lisp that can remove all objects (lines, polylines, blocks etc.) outside of a polyline. polyline is closed and shape is variable, so not rectangle.
View 3 Replies View RelatedI cant do booleans with polylines, for that I need to convert them to regions which I dislike because I lose edit vertex capabilities right? Also, from a region, how can I convert a region to a closed polyline in one go.
View 2 Replies View RelatedI am trying to find a command that will hatch the inner edge of a complex closed poly line, rather than hatch the entire area inside the poly line.
When I have simple shapes such as a rectangle I create a smaller rectangle inside the first that is 1' (or whatever I want my hatched area to be) smaller on all sides than the first rectangle. I hatch by selecting the two rectangles; I change the "Associative" hatch property to "No" and then delete the inner rectangle.
My problem now is that I have a complex closed poly line that I would like to hatch the inner perimeter with a set thickness, say 1 foot. Is there an easy way to hatch a inner boundary of a closed poly line or to recreate a scaled down copy of the poly line that is a set distance smaller all around. I hope I have conveyed the question clearly enough.
I can draw a closed polyline representing a closed area.
I can then toggle its 'closed' property and it seems to make no difference. area is same, I can extrude or create regions, I can hatch in either case.
in which specific situations we should bother about whether a polyline is closed or not?
I want to find the cardinal points ( N, S, E, W) of each face of a closed polyline, how?
Windows 7 (x64)
AutoCAD 2012 (x64)
I'm trying to calculate the principal moments (and section modulus) of a slection of closed polylines.
On this blog, I read that there are some new classes and functions in the AutoCad 2014 objectARX that can do this.
The one that interests me the most is 'RegionAreaProperties.PrincipalMoments Property'.
However with my limited programming skills, I can't get it to work in vb.net.
I thought is was just a property of a region, but something like 'myregion.RegionAreaProperties.PrincipalMoments' does not work.
With the code I already have I use a selectionfilter to select multiple closed polylines. I can convert these to regions if nescesary. But what is the next step? I can't find any samples of it. Not even in the Autodesk Developer's Guide.
I have linked my drawing to a database with text inside a closed polyline. Is there a way to have the area of the closed polyline stored in the database as a live area.
View 8 Replies View RelatedI drew a very complicated 2-D plot this afternoon. The most majority of the plot is composed of different straight lines, arcs. Then I used the polyline function to join them together to form a closed single polyline (Modify->object->polyline).
Later on I want to change something in part of the polyline. Then I used the 'pedit' again, I chose 'open'. But the whole polyline won't break into its original segments. I tried through all the menus, just cannot find the right tool for this purpose.
Does it mean I have to start over from scratch to redraw the whole plot?
I am a landscape architect, and am trying to use bushy linetypes to delineate blobs of mass plantings. I created my custom line types, and tweaked them to the point where they look the way i want, but whenever i have a curve the line type faces in not outside the closed polyline. all of my shapes are closed poly lines, and i need the linetype to face out other wise it looks weird. I am attaching a picture the strait line to the right is the way that it is supposed to look, but in the circle you can see how the points are all facing in to the middle of the circle? reversing the direction dose nothing, and using a or u in the place of r in the linetype shape code doesn't work either below is the line types code and image.
*Curveypines, Curvey zigzag
A,.0001,-0.0,[a,curvya.shx,s=.01,r=0.0,x=0,y=0],-.25,[b,curvyb.shx,s=.01,r=0.0,x=0,y=0],-0.0,[a,curvya.shx,s=.015,r=0.0,x=0,y=0],-.355,[b,curvyb.shx,s=.015,r=0.0,x=0,y=0],-0.0
Screen shot 2012-03-07 at 4.30.48 PM.jpg
Im wondering if exist any lisp, for erasing or selecting elements inside multiple closed polyline.
So if i have 34 closed polyline in drawing, and i wont to be erased everything inside those polyline?.
I'm trying to model a 3d leadscrew. How can I extrude a 2d closed polyline in a straight line while at the same time twisting it (360° twist for every 1.5" along the path). I've tried loft, sweep, extrude all using the helix as a path. When I can get a result, it ends up being a corkscrew.
View 9 Replies View RelatedI have been using AutoCAD to create product designs (baby bottles) for the last three years. I am normally drawing lines, arcs and splines to create the shape, then I use PEDIT to create a closed polyline and REVOLVE to create a SOLID 3D object from that shape.
Couple days ago, AutoCAD is not longer creating 3D solids when I use REVOLVE as usual (even using older files and/or the same shapes or polylines that I have used before to create 3D solids). The result of REVOLVE is "SURFACE (REVOLVE)" (I got that from properties). But, the most uncommon thing is that AutoCAD is revolving fine one or two times per day after many many tries. (normally I am closing and opening files and trying to revolve some stuff many times, using the same process and suddenly it revolves the sahpe as a 3D solid)
I attached a picture showing two objects created using the same group of lines, splines and acrs. One is a solid 3d object and the other one is a surface (revolve) as result of using REVOLVE command. WHY????
I am not able to extrude closed polyline shapes. I get the following message:
Cannot create solid from open curve.
Cannot sweep or extrude non-planar objects.
Unable to extrude the selected object.
Other folks have opened my drawing – some can extrude, some get the same or similar message. I’ve tried re-building the shapes to extrude. It worked with one thing this morning and now it won’t extrude again.
I need user to draw a closed ployline. Is it possible to use VBA to code a procedue that the effect looks like the WPolygon of select ?(2 rubber-band lines)
View 1 Replies View RelatedI always get the message after I make a closed boundary polygon, and I know it's a closed boundary, but I know how to fix it. It just bugs me sometimes when the message pops up when I add it as a boundary under the definition of a surface.
View 2 Replies View RelatedI've read 2013 is going to include line labeling capabilities by selecting 2 points rather than selecting linework. Is there going to be a way to label an area without creating a closed polyline or parcel, where it works the way a hatch works. So if I selecting in the middle of multiple individual intersecting lines, it labels the area.
View 9 Replies View RelatedIs there a routine that I could use to count the blocks that are in a closed polyline? The blocks may have or not one or more attributes.
In a previous session I saw a routine which was counting the blocks which had attributes in them, but it doesn't really work, because some of the blocks dont have attributes.
Also is there a routine that counts the different texts that are in the same polyline?
Is there a command or a lisp that will automatically dimension each side of a closed polyline at once? See attachment for image.
View 1 Replies View RelatedHow do I solve this problem I cannot join basic lines to make a closed polyline as they will not join together. So i tried to use the flatten command which does not work and out puts error below:-
Command Prompt Input/ouput
Command: FLATTEN
Select objects to convert to 2d...8 found
Remove hidden lines? <No>:
A vertex was added to a 2D pline (0) which had only one vertex.
A vertex was added to a 2D pline (0) which had only one vertex.
A vertex was added to a 2D pline (0) which had only one vertex.
A vertex was added to a 2D pline (0) which had only one vertex.
A vertex was added to a 2D pline (0) which had only one vertex.
A vertex was added to a 2D pline (0) which had only one vertex.
A vertex was added to a 2D pline (0) which had only one vertex.
I've have code to test if the insertion point is within a closed polygon. But prior to testing the insertion point I use ssget to trim the selection set initially..
(ssget "CW" Pnt_List (list (cons 0 "INSERT")(cons 2 BlockName)))
this requires that the whole Crossing Polygon is visible, so I do a zoom first. This requires time. Is there a way I can do this that does not require the zoom?
I'm trying to look for a LISP command where i will create a closed polyline with 4 sides in different angles. then convert it to region.
View 6 Replies View Related