I've been working for hours on trying to incorporate a selection set called out previously in this script, but if I replace the code:
(defun c:TTG3 ()
(entmod
(DeleteVertexAt
(entget (setq en (car (entsel))))
3
)))
...with anything related to "W" p3 p4 '((0 . "*POLYLINE)) or the like, even if the code works on other parts, there is a 'nil' or malformed list error. I need this portion of the code to recall p3 and p4 and select only polylines from it. The script has to perform "DeleteVertexAt" until all selected polylines have been accounted for.
The original code for "TTG3" is here http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Deleteing-polyline-vertex/td-p/871485. But I am incorporating it into a large 3 part script, the first two recall p1 and p2 effortlessly, what is making the portion above lose p3 and p4 also?
Attached is a copy of the overall code.
The goal:
When TTG3 can run in loop until all the selected polylines have been touched /once/, then a final code will be added to reflect TTG1.
Solved! Go to Solution.
Solved by BlackBox_. Go to Solution.
Can you explain again what you need please? Please show me the end result of what this text means in your original post:
>>>>>>>>>
but if I replace the code:
(defun c:TTG3 ()
(entmod
(DeleteVertexAt
(entget (setq en (car (entsel))))
3
)))
...with anything related to "W" p3 p4 '((0 . "*POLYLINE)) or the like
<<<<<<<<<<<<<<<
Thank you for the swift reply! The purpose to the code of 'TTG3' is to remove an extraneous vertex generated by 'txtexp' from Express tools. The Region command will not recognize overlapping polylines and thus not generate a region needed to create the final product. TTG3 has to be run and has to recognize all polylines within a set window selection area to make this happen. The code must only run once before moving to 'TTG4' (to be added, see below).
---
Overall, the code has to Explode/region/unite bold text (TTG1), convert the left-over polylines on #4s (TTG2), then remove the extra vertex '4' (TTG3), and finally to be added another round of region/union/explode to finalize the process. I can get the last portion to work if TTG3 can recognize the polylines automatically and finish itself out.
---
Here's a screenshot of the text before and after the script is run. After the TTG2 portion has been run, the script somehow loses the selection sets that were made in the beginning. I understand the initial one of 'p1' and 'p2' are already reset, but shouldn't 'p3' and 'p4' still be in the memory since it was called out at the start?
---
(See attached JPG for this part)
I need the 'TTG3' portion of the lisp to automatically select the purple lines which overlap themselves. I did a simple swap-out of the existing code of 'entsel' with a "W... polyline" code, but something keeps triggering a single-selection (however the filter being recognized by cad).
Thank you for any help n knowledge ya may have with this ^..^
Ok, got the code this far... It was working at one point but now I am stuck. What is wrong with the code?
It was working at one point to convert the manually selected polylines to regions, but not union them to the other set.
All SS sets are lost after the third portion "TTG3" is run!
Can I have the DWG file which is already at the point by which you run the TTG3 command please?
Use the lisp routine on this reply, the other one for some reason did not work even when I reloaded it on a new drawing. The dwg file has descriptions on each step and where/when the problem occurs. So can't wait til this code is complete. Been working on this one issue for nearly 2 or 3 months now. Thank you again for taking a look.
@ksmith84 wrote:I've been working for hours on trying to incorporate a selection set called out previously in this script, but if I replace the code:
(defun c:TTG3 ()
(entmod
(DeleteVertexAt
(entget (setq en (car (entsel))))
3
)))
...with anything related to "W" p3 p4 '((0 . "*POLYLINE)) or the like, even if the code works on other parts, there is a 'nil' or malformed list error. I need this portion of the code to recall p3 and p4 and select only polylines from it. The script has to perform "DeleteVertexAt" until all selected polylines have been accounted for.
Just a quick guess...
(defun _FOO (p3 p4 / ss i) (if (and DeleteVertexAt (setq ss (ssget "w" p3 p4 '((0 . "*POLYLINE")))) ) (repeat (setq i (sslength ss)) (entmod (DeleteVertexAt (entget (ssname ss (setq i (1- i)))) 3 ) ) ) (if (not DeleteVertexAt) (prompt (strcat "\n** Function \"DeleteVertexAt\" not defined ** ") ) ) ) (princ) )
[Edit] - ... And an even quicker example:
(defun c:FOO (/ p3 p4) (if (and (setq p3 (getpoint "\nSpecify oposite corner: ")) (not (initget 32)) (setq p4 (getcorner p3)) ) (_FOO p3 p4) ) (princ) )
"How we think determines what we do, and what we do determines what we get."
BlackBox, trying the first code via c:_FOO returns a message saying "Too few arguments", leaving the code as shown typed it gives "no command definition". Am I placing it in the wrong spot?
UPDATE -
They work great! I was misinterpreting the code, but was able to call it correctly from the start script also. Going to work on getting the closing portion working.
ok, this last part is driving me nuts. I can't get any other commands to recognize selections now. The codes up to now work woderfully. But every place I embed or even add at the start, the region and union commands are not recognizing any ss callouts or fresh window callouts. >.<
I like what you did Blackbox, with the selection window. Can it be made to carry "ss" to region and union? This will finish out the script.
"How we think determines what we do, and what we do determines what we get."
Got it working! The script for Text To Geometry is complete finally!!
Thank you hundreds of times over to everyone that has been helping get this working over the past couple months!!
@ksmith84 wrote:Got it working! The script for Text To Geometry is complete finally!!
Thank you hundreds of times over to everyone that has been helping get this working over the past couple months!!
Congrats, ksmith84!
... Although, I should have thought to share these earlier *shrug* :
http://apps.exchange.autodesk.com/ACD/en/List/Search?productline=ACD&query=seant&facet=&collection=
Cheers
"How we think determines what we do, and what we do determines what we get."
Haha true, and still appreciate the extra thought there. We have tried the 't2g' without success (currently running Autocad Mechanical 2009).
Again, thank you BlackBox and everyone else too (you too Mr. Lee)! My gratitude is limitless right now 😄
@ksmith84 wrote:Haha true, and still appreciate the extra thought there. We have tried the 't2g' without success (currently running Autocad Mechanical 2009).
Again, thank you BlackBox and everyone else too (you too Mr. Lee)! My gratitude is limitless right now 😄
No worries; that is kind of you to say.
Cheers
"How we think determines what we do, and what we do determines what we get."
@AlwineCAD wrote:
I tried to download this file but was blocked by a virus detector.
I am not getting any virus alerts when downloading this. A false positive perhaps?
Thanks
Discussion_Admin
@Discussion_Admin wrote:
@AlwineCAD wrote:
I tried to download this file but was blocked by a virus detector.
I am not getting any virus alerts when downloading this. A false positive perhaps?
Thanks
Discussion_Admin
You're replying to a post from three years ago. Haha
Cheers
~ Thread officially zombified.
"How we think determines what we do, and what we do determines what we get."
@BlackBox_ wrote:
... Although, I should have thought to share these earlier *shrug* :
http://apps.exchange.autodesk.com/ACD/en/List/Search?productline=ACD&query=seant&facet=&collection=
Cheers
For those who may be interested, here's an updated App .bundle, which now supports 2017:
Cheers
"How we think determines what we do, and what we do determines what we get."
What I get for blindly following thread reports
No worries, @Discussion_Admin Haha; it gave me a reason to post an updated link to a friend's great work, and for that, I thank you. :beer:
Cheers
"How we think determines what we do, and what we do determines what we get."