Funny thing...
I have this very code open in notepad right now...
(setq acm (vla-getinterfaceobject (vlax-get-acad-object) (strcat "Autocad.AcCmcolor." (substr (getvar 'acadver) 1 2))))
(vla-put-colorindex acm lcol)
(vla-setcellbackgroundcolor objtable row 2 acm)
Have you ever heard the term "A dog with a new pan" or "A cow at a new gate?"
I looked at it and had no idea what to do with it...
I remember thinking "What does Autocad version have to do with it??" - I suppose that reveals my lack of understanding..
Steven P, your code works perfectly (unless someone has done a manual over-ride in the properties tab.)
I can live with that.
If I could change anything I'd remove all the RGB references unless there is a setting to make a Truecolor = ByLayer.
I'm going to try to figure that out...
To keep everything Bylayer I replaced
(vla-SetRGB col 12 34 56) or
with
(vla-put-colorindex col 256)
(that seems to have worked)
Anyway. Big thank you. (to you both)
Appreciate your time and your commented code
This was is a biggie in my work process...
Ok simplest way is dont add holes then dim, rather add holes via a offset from edges and then the dim will follow. Have something somewhere.
Above image pick vertical, then questions 2, 65 70, 117, 200,50
Just have to check which one matches your request.
Happy to provide some code but need how you see the sequence of entering data.
This is something like the vehicle check I wrote follows a pline, it draws a forward arc and looks at intersection point so would look at is point less than 2 degs, if so point is on existing. If not draw segment 5,5 long but 2 degs towards the existing.
THIS IS NOT CODE for this task needs more. It is an example of walk along.
Stephen P or any one can use code.
(setq obj (vlax-ename->vla-object (car (entsel "\nPick Pline"))))
(setq interval ( getreal "\nEnter spacing m:"))
(setq cRad 3.05)
(setq startang (* pi 1.5))
(setq endang (/ pi 2.0))
(setq dist 0.0)
(setq len (vla-get-length obj))
(setq stpt (vlax-curve-getpointatdist obj interval))
(setq num (+ 1 (fix ( / len interval))))
(repeat num
(command "arc" "C" stpt (polar stpt endang crad)(polar stpt startang crad))
(setq objarc (vlax-ename->vla-object (entlast)))
(if (= (setq intpt (vlax-invoke obj 'intersectWith objarc acExtendnone)) nil)
(setq intpt (vlax-invoke obj 'intersectWith objarc acExtendThisEntity)) ; needed at start
)
(vla-delete objarc)
(setq ang (angle intpt stpt))
Need a real dwg with a few plines of existing path to test with.
Tables are a bit like dims heaps of variables. You can reset the look of nearly any table after its made can be easier than perhaps trying to make a Table Style.
This may help, I just google the VL command for examples. Last one I found was (vla-SetBackgroundColor which set 1 cell similar to the post by Stephen P. In this case a layer color.
(setq acm (vla-getinterfaceobject (vlax-get-acad-object) (strcat "Autocad.AcCmcolor." (substr (getvar 'acadver) 1 2))))
(vla-put-colorindex acm lcol)
(vla-setcellbackgroundcolor objtable row 2 acm)
list of methods for a table.txt
Please WIDTH, thickness is something altogether different in Autocad.
What is problem with draw 1 pline then offset twice and change original pline width and linetype ? I would use like a custom linetype like one I have "equal" which is a equal draw solid and gap. Change LTSCALE and lengthens or shortens central pline dashed pline.
Should add if common sizes then just type a size eg 300 then all values are known +- 150 and width = 270.
mhupp this may be useful, nentsel to get attribute tag name then use ssget pt where pt is the insertion pt of the tag, this second ssget will then get the block so you can get block name to use. (ssget (list (cons 0 "INSERT")(cons 2 bname)))