Message 1 of 19
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anyone can provide a lisp a seek to change like that:
Before
After (use the point of recloud)
before
Solved! Go to Solution.
Can anyone can provide a lisp a seek to change like that:
Before
After (use the point of recloud)
before
Solved! Go to Solution.
For rectangular shape then you can try this:
Re: convert revcloud to rectangle or square - Autodesk Community - AutoCAD
For polygon shape then you can try this:
Can you upgrade the lisp by ssget? And Specific layer.
Try the attached modified: REV2REC.lsp for rectangles
And Rev2Poly.lsp for polygons
@paullimapa wrote:
Try the attached modified: REV2REC.lsp for rectangles And Rev2Poly.lsp for polygons
The REV2REC doesn't really care whether the original is rectangular, whether or not it was made with the Rectangle option in REVCLOUD, but simply takes the outermost extents of the vertices of any shape of arc-segments-only Polyline, and builds a rectangle around them. I find REVCLOUD's Rectangle option doesn't always even make a 4-edge result anyway -- this was drawn with it [6 grips, 10 arc segments, decidedly diagonal in places]:
Typical of Revcloud Polylines, it has more than one arc segment along some of the grip-defined "edges." But some Revclouds don't even have any vertices falling on the grip locations:
I assume (?) the OP wants those grip-defined "edges" used to draw the no-arcs conversion, but I'm not sure how they can be derived in a situation like that -- entity data has only the vertex locations at the ends of the arc segments.
The REV2POLY command simply draws the straight-line-segment version through all the arc-segment vertices, ignoring the possibility of multiple arc segments along a given "edge." If that will suffice, there a much easier way to get that -- simply strip out all the bulge-factor entries from entity data, and it will use zero for all segments:
(defun C:REV2POLY (/ pl pldata)
(setq
pl (car (entsel))
pldata (entget pl)
)
(entmod (vl-remove-if '(lambda (x) (= (car x) 42)) pldata))
(prin1)
)
The Polyline retains its Layer and all other properties -- it only gets its arcs all straightened. [A check on appropriate selection could be added, etc.] But that results in more edges than the grips of a Revcloud-variety Polyline suggest.
What I don't understand is how AutoCAD "knows" that a given Polyline is a Revcloud. I tried Exploding one and PEDIT-Joining the Arcs back together, assuming it would "break" the definition, but it still knew, so I suspect it's that it has only arc segments, and all with the same specific bulge factor. But how does it come up with the oddball grip locations in the second image above? I don't find anything defining the difference in the DXF reference, or entity data, and they have no extended data. If whatever that is can be determined, maybe something could be done that would actually follow the smaller number of grip-defined edges, rather than the larger number of vertices.
Thank you for lisp. However I found that for the lisp of revc2poly, if I go to the layout page, the effect of lineweight and divide can not be adopted like that:
When creating object of by using revcpolygon below (revc rectangle is ok).
How can resolve this?
@skchui6159 wrote:
.... for the lisp of revc2poly, if I go to the layout page, the effect of lineweight and divide can not be adopted like that:
When creating object of by using revcpolygon ....
No posted code uses revc2poly as a command name. Which or whose routine are you talking about? If you use the REPLY button within the Message you're Replying to, we might be able to tell. When you use the "Reply to the Topic..." slot below the last Message, it always shows as being in Reply to the author of Message 1 [yourself in this case]. Mine doesn't deal with linetype or Layer yet, but those are easily included.
And by "using revcpolygon" do you mean the REVCLOUD command and it Polygonal option?
Post a sample dwg where you're having trouble seeing the linetype develop in your vport layout.
Typically the problem has to do with PSLTSCALE, LTSCALE & MSLTSCALE
Starting with 2021 the Revcloud is somehow recognize as a separate object than a Polyline
If you run this code and it includes that in the Classname is the only way I know to determine what the selected object really is:
(getpropertyvalue (car(entsel)) "Classname")
Polyline would return: ""
Revcloud would return: "AcDbPolyline (Revcloud)"
Sorry, I should reply the above lisp with reply button. In Rev2Poly.lsp, if create object in layout (not model space) the revclound it can not be use to change the lineweight.
Before using Rev2Poly
After:
Your lisp works (sample version of REV2POLY) on layout page. If I use in layout page and change the lineweight and linetype scale in layout page, it is ok!
Sorry, I am talking about above long version of rev2poly.lsp.
@paullimapa wrote:
Starting with 2021 the Revcloud is somehow recognize as a separate object than a Polyline
If you run this code and it includes that in the Classname is the only way I know to determine what the selected object really is:
(getpropertyvalue (car(entsel)) "Classname")
Polyline would return: ""
Revcloud would return: "AcDbPolyline (Revcloud)"
@paullimapa It is also stored as XDATA:
(-3 ("RevcloudProps" (1070 . 0) (1040 . 9.0)))
Sir, this is the attached sample dwg
Looks like in Model space your linetype scale is set at 0.5 but in Paper space it's set to 0.15.
So I modified the attached Rev2Poly.lsp to show this difference.
Not sure were I got this.
(defun c:getXData ( / ename edata )
(if (setq ename (car (entsel "\nSelect entity to read xdata: ")))
(progn
(setq edata (entget ename '("*")))
(if (setq xdata (cdr (assoc -3 edata)))
(foreach item xdata
(print item)
)
(princ "\nEntity has no xdata.")
)
)
)
(princ)
)
Thank you very much!
You are welcome….cheers!!!
Well done, Yeah! Thank you very much! CHEER!!!!