AutoCad :: SSGet All 3D Polylines And Break At Vertices?
Oct 14, 2012I'm in search of a good lisp that will ss get all 3d polylines & break at the vertices.
View 4 RepliesI'm in search of a good lisp that will ss get all 3d polylines & break at the vertices.
View 4 RepliesThe Straighten method seems to always default to the first vertex of the polylne, which is great if you want to start there but what if you wanted to delete the 10th to 15th vertex? Is this even possible using PEDIT Tools (it is very possible using the WEEDFEATURES method)
IDSP Premium 2014 (mainly Civil 3D 2014 UKIE SP1 & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 256Gb SSD, 300Gb 15,000 rpm HDD
16Gb Ram Intel Xeon CPU E5-1607 0 @ 3.00GHz (4 CPUs), ~3.0GHz
NVIDIA Quadro 4000, Dual 27" Monitor, Dell T3600
I have a drawing with 3D polylines that will be used to build a surface but many of them cross each other.
I would like to extract the vertices of these polylines and use this information to build the surface but can't figure out an easy way to do this.
I have tried the Points at Vertices Automatic which is ok but as there are 300 or so 3D polylines this will get very tedious very quickly - is there a better/quicker way to do this?
IDSP Premium 2014 (mainly Civil 3D 2014 UKIE SP1 & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 256Gb SSD, 300Gb 15,000 rpm HDD
16Gb Ram Intel Xeon CPU E5-1607 0 @ 3.00GHz (4 CPUs), ~3.0GHz
NVIDIA Quadro 4000, Dual 27" Monitor, Dell T3600
I have two polylines. Segments of one polyline are directly on top of segments of the other polyline. When I grab one of the polylines to stretch the vertices, it grabs the vertices of the polyline underneath.
View 1 Replies View RelatedIs it possible to change te Break command permanently in the Break at Point command?I never use break, only break at point.
Changing te macro for break ^C^C_break to the macro for break at point ^C^C_break \_f @ doesn't work.
To do it manualy at the command prompt takes to much keyboard entries and mouse clicking.
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.
How to draw 3D polylines, or convert single lines to polylines?
this.JPG
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.
This works, but I do not want to have to select on the screen... [HTML] ss.SelectOnScreen[/HTML]
I tried to select a crossing of two coordinates, that didn't work... [HTML] ss.Select acSelectionSetCrossing, ip, ipCross[/HTML]
My next step was to filter for TEXT and LAYERNAME, but that didn't work either...
[HTML] Dim FilterType(0 To 1) As Variant
Dim FilterData(0 To 1) As Variant
FilterType(0) = 0: FilterData(0) = "TEXT"
FilterType(1) = 8: FilterData(1) = "FILEPATHTEXT"
ss.Select acSelectionSetAll, , , FilterType, FilterData[/HTML]
So I have this great little program to add text, and just want to delete it first if it already exists, and I just cannot do it. .
[HTML] ' Define Text String coordinates
Dim dwgscale As Integer
dwgscale = ThisDrawing.GetVariable("DIMSCALE")
[Code]....
I've been twigging around with a selectionset, but no luck. I need to build a ss with several named blocks and a few dynamic blocks which get selected as anonymous. Unfortunately not all dynamic blocks should be selected and I can find no way of either filtering out a list of dynamic blocks to exclude nor any way to campare to a list of dynamic blocks that I want selected. Below is the best idea that I had but if I wrap it into a foreach with an exclusion list, I get an empty selection set returned. (I'm guessing that I need to trim the pairs each iteration and only return the matches instead.)
(SETQ blklst (LIST "Cleaner" "DRAIN" "Return" "Therapy""PoolLight" "Paraleveler" "Waterleveler" "Skimmer" "UMSLEEVE") blst "Cleaner, DRAIN, Return, Therapy,PoolLight,Paraleveler,Waterleveler,Skimmer,UMSLEEVE")(IF (AND (SETQ ss (SSGET "x" (LIST '(0 . "INSERT") (CONS 2 (STRCAT "`*U*" blst)) '(410 . "Model")))) (FOREACH i blklst (MAPCAR '(LAMBDA (x)(IF (NOT (EQ i (VLA-GET-EFFECTIVENAME (VLAX-ENAME->VLA-OBJECT (CADR x)))))(SSDEL (CADR x) ss) ) ) (SSNAMEX ss)) ) ) (WHILE (SETQ Ent (SSNAME ss 0)) (SETQ BlkName (CDR (ASSOC 2 (ENTGET Ent)))) (IF(SETQ tempList (ASSOC BlkName EndList)) (SETQ EndList (SUBST (CONS BlkName (1+ (CDR tempList))) tempList EndList))(SETQ EndList (CONS (CONS BlkName 1) EndList)) ) (SSDEL Ent ss) ))
The other code is long and I'd rather not confuse things; if I do not try to filter out any Unames, then everything works great and fast. Once I add in the "foreach i blklst" the code breaks and I get:
; error: null interface pointer: #<VLA-OBJECT 0000000000000000>
returned.
I try to use the SSGET function, and it returnes a string.
How to access the data?
Which function to use?
I wonder if I have to check if the "ssget" is empty.
I have a lisp to zoom extents in visible objects on the screen.
My interest is to filter before applying:If I have selected objects, it zooms in these objects. If I'm not have selected objects, continue as it is today, applying a zoom in the visible scene.
The result would be similar to a zoom of "3dsmax" (press the Z key)
The atual code
(defun c:ZOBJECTS(/ selectprev)(SETQ selectprev (SSGET "_P"))(command "._UCS" "View")(command "._zoom" "extents")(command ".__zoom" "object" "cross" "-1e99,-1e99" "1e99,1e99" "")(command "._UCS" "previous")(command "._select" selectprev ""))
Is there any way to isolate an item in a list for a filter? I'm setting a filter for SSGET and know that I can use the dotted pairs and I know I can use logical comparisions but what I really want to do is filter a single varialbe in the DXF group 10. For example, I'd like to only get entities with a specific Z value in DXF 10. Or even better to filter for a specified range of Y value or X value in DXF 10. If I could write something like (cons 10 (list * * 8.0)) where the asterisks were wild cards, that would do it but I'm not aware of such a wildcard. Is there any way to isolate a portion of DXF 10 in the filter?
View 4 Replies View RelatedI have some strings like the ones below. They are always in the same format. The first line is Cold Water, the second is Hot Water and the third is Hot Water Return.
I want to build a selection set based on whether it is CW, HWS or HWR. Right now I have a routine to retrieve the string by using ENTSEL. In other words if I want to use the line of text for Cold Water I have to select it.
I'd like to be able to window them all and filter the SS for only the string containing CW and conversly HWS and HWR. SSGET function filter.
"2''CW-52.0 WSFU"
"2''HWS-48.0 WSFU+12 GPM"
"1"HWR-12 GPM "
I have this code that I wrote years ago that I want to update to select two types of civil3d objects and show them selected with grips on the screen. This function works fine
(defun CELFEATURE ()
(ssget "_X" '((0 . "AECC_FEATURE_LINE")))
(setq sset (ssget "P"))
(if sset
(progn
(sssetfirst sset sset)
;(command "_.PROPERTIES")
)
)
)
(defun cF () (CELFEATURE))
but if I add the extra object like this which I assume is the wrong syntax i only get the second type of objects. Need correct syntax I should be using for selecting more than one object in an ssget statement.
(defun CELFEATURE ()
(ssget "_X" '((0 . "AECC_FEATURE_LINE","AECC_AUTO_CORRIDOR_FEATURE_LINE")))
(setq sset (ssget "P"))
(if sset
(progn
(sssetfirst sset sset)
;(command "_.PROPERTIES")
)
)
)
(defun cF () (CELFEATURE))
Distinctions between AutoLISP functions ssget and C# PromptSelectionOption method.AutoLISP ssget function is apply a function with no options and does not require an object selection.pre-selected target object should respond to the selection set.
However, and C# PromptSelectionOption, ignoring the pre-selected objects, select the new object is required.using the features of C# Prompt Selection Option expressed AutoLISP ssget do the same in,
I'm having an issue with using the SSGET to select a block so I can move it. I'm changing the UCS to be at the center of the top view in the program(user selects center) and the block is at 0,0,0 after changing the UCS. However when I use SSGET it doesn't select it. So I used:
(setq en(car (entsel "
Select a block :")))(setq enlist(entget en))
and it lists the DXF Code of 10 as
(10 15.0893 13.5165 0.0)
How can I then select it if I don't necessarily know where the block is going to be?
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
I have a data structure called LayerList in the format [LIST "LayerName" "Linetype" Thickness Color]I then use the following piece of code to go through the structure selecting polylines and converting all polylines on a given layer to the correct thickness
(foreach layr layerlist
(setq player (car layr))
(if (setq ss (ssget "x" '((0 . "*polyLINE") (8 . player ) )))
(command "pedit" "m" ss "" "w" 0.15 "")
(princ "
No polylines exist!")
)
)
However all i keep getting is Bad SSGET list value at the command line,
If you do a LIST command on a dynamic block... AutoCAD tells you the Block Name as well as the Anonymous Block name.
How can I use ssget to snag all Dynamic Blocks that use the 'Real Block'?
I don;t know what happen with this piece of code, I have checked it a million of times and seems to be well done. I'm trying to filter a previous selection and select Text or Mtext objects that are in the layer COTREF, and that contain the strings "%%c" AND "L" at the same time. The problem is that the code it's not selecting objects with the "L" included.
Here's the
(setq grupo1 (ssget "" '((0 . "TEXT,MTEXT")(8 . "COTREF")(-4 . "<AND")(1 . "*%%c*")(1 . "*L*")(-4 . "AND>"))))
The most unreasonable thing it's that I have 2 text objects exactly the same and when using this filter codes just one object it's selected (cyan cloud), check included DWG file.
I'v been searching about it and seems some persons are having problems with ssget filters in the newer versions of AutoCAD, I'm using 2012. I'm also suspecting for the character "%" which could be working as a wild-card, but as far as I know it is not.
I am trying to figure out how to had multiple vertices to a feature line. I'm thinking its right in front of me, but I'm just not seeing it. I have been adding vertices by "insert elevation point" manually and it is a really nice feature in that it picks up the elevation that is already attributed to the feature line, but it would be nice to speed up the process.
View 2 Replies View RelatedHow do I interate through the vertices of a leader and update them.
I have tried
myObjRef.UpgradeOpen()
For i = 0 TomyObjRef.NumVertices - 1
Dim MyVertex AsNewGeometry.Point3d(myObjRef.VertexAt(i).X, _
myObjRef.VertexAt(i).Y, _
0.0)
myObjRef.SetVertexAt(i, MyVertex)
Next
I had expected properties like StartPoint LastVertex to be updated.
I'm having an issue whenever I link an AutoCAD dwg. I model everything in Max but use AutoCAD line-work as a guide. As of Max 2013, when I do this, I notice that every line linked is divided into six segments. I tried re-loading the linked file setting curve steps to "0" but still no change.
The linking goes well, no problems at all neither at first nor at re-loading time, but it is quite annoying to have all these extra vertices when I'm modelling over the CAD lines.
I've got some 2D contours that have certain vertices very close to each other in some parts of the string. Some are only 0.008 apart. The cross checking in Drawing cleanup is picking these all up as crossing strings.
anything that will possibly filter out these vertices at a set tolerance? I've tried using Snap clustered nodes but that won't work seen as though it is occurring on the same string.
I want to clone a polyline3d and set all vertices Z to 0.0 and use that one in my program. I don't want to add it to the database, just use it in memory and then dispose it. I know how to access all vertices in a polyline3d that exists in the database using a transaction, but this will not work with my cloned polyline3d in memory.
Here's part of my
Dim acDoc As Document = DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() Dim idArray As ObjectId() = sSet.GetObjectIds() For Each id In idArray Dim entity As Entity =
[code]........
Why does my new lines all show their vertices, even if they arent selected? I dont want the vertices to show when the lines isnt selected.
View 3 Replies View RelatedI know I can use the following...
...Polyline3d pl3d = acEnt as Polyline3d;foreach (ObjectId id in pl3d){ PolylineVertex3d plv3d = tr.GetObject(id, OpenMode.ForRead) as PolylineVertex3d; Point3d p3d = plv3d.Position; ...}
But I need to work with "for" loop.It seems "pl3d[i]" does not work.Is there other ways to iterate through Polyline3d vertices?
how do I turn off the new "stretch" vertices?
I am finding that I click to select a line, and start typing commands, only to find out they aren't registering b/c I have selected that un-needed extra vertex in the middle of every pline segment.
I have checked the Options, and cannot find how to turn those off. They were not in 2008.
Civil 3D 2011
Is there a way to specify simplification of a line when doing the Boundary Command? I notice that if I zoom out further that some vertices are eliminated in curves. How I can guarantee that the boundary is exactly the same as the plines that I specify.
View 4 Replies View RelatedThe vertices of the polyline cant’ be extracted!
The “list” command does give the coordinates of the vertices of the polyline while these data can’t be extracted by using the command “Extract Data”.
Is there some workaround to have the vertices of the polyline extracted in a table?
Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.
How do I make the Qleader retain 3 vertices when I stretch the vertices? It's fine if I do not enter any text with the command and then create separate MText, but I'd like to use the command as it's written. However, if I start stretching the endpoints around on the screen, I will end up with extra vertices in the line, and I cannot get rid of them.
View 3 Replies View Related