@Anonymous wrote:
...
I wish to learn this program. Unable to understand some of functions/arguments used in the program. Especially, the functions of vla-startundomark and Wcmatch. Also, where I can get the information about assoc-1? I only know the assoc-10 and assoc-11 which is for start and end points.is it right?
...
>> vla-startundomark
I don't know much about these ActiveX functions... just a few lines a commands is saw somewhere.. These two lines
(vla-startundomark (setq adoc (vla-get-activedocument (vlax-get-acad-object))))
(vla-endundomark adoc)
are marks for undo function... from start till end it's one undo step. You can use (command "_.UNDO" "_Be") and (command "_.UNDO" "_E"), but these leaves report in command line.
>> WCMATCH
This is function for text match. Very usefull. You can use a lot of wild-cards. See help
>> (assoc -1 ed)
This is way how to get entity name from entity's definiton list. But usually you use (car (entsel)) or (ssname ss i) for the same. Compare these two lines
(car (entsel))
(cdr (assoc -1 (entget (car (entsel)))))
... you'll get the same - entity name.
>> (assoc 10 ed) (assoc 11 ed)
Just for LINE applies that 10 is start point, 11 the end. Type for "LINE dxf" in help and you'll see all codes...
But e.g. LWPOLYLINE (type name for regular polyline) has no 11 point and all verteces are 10. There is multiple 10 point in LWPOLYLINE definition. See help
And our MLINE have 10 as start point and multiple 11 as verteces. I my routine I seperated both 10 and 11, but then you reported problems with trimmed MLINEs - my solution was take just 11 points because 10 keeps always as (former) beginnig, eve it was trimmed and real beginning is somewhere else (defined by first 11 point). So...
Btw. TEXT has also 10 and 11. 10 is insertion point, 11 alignment point...
INSERT (block) 10 for insert point
CIRCLE 10 for center point
ARC 10 for center point as well. And end point are defined by angle! See... To get that is probably best use (vlax-curve-getStartPoint en) and (vlax-curve-getEndPoint en). Anyway, read about them here, because these are very simple to use and get some geometrics about curves - all, not just arc, polylines, lines, splines...
Hope this helps... and sorry for my english.