Author Topic: AcadAcCmColor in LISP?  (Read 4171 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12937
  • London, England
AcadAcCmColor in LISP?
« on: June 22, 2009, 07:33:41 PM »
How do I specify a colour of the type: AcadAcCmColor in LISP?  :?

Thanks,

Lee

T.Willey

  • Needs a day job
  • Posts: 5251
Re: AcadAcCmColor in LISP?
« Reply #1 on: June 22, 2009, 07:36:11 PM »
I don't know what you're talking about.  What property are you trying to change?  Or if that isn't correct, what are you trying to do?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12937
  • London, England
Re: AcadAcCmColor in LISP?
« Reply #2 on: June 22, 2009, 07:37:30 PM »
A Table Grid Colour, using vla-SetGridColor - but I am inexperienced to say the least when working with Tables, so let me know if I am approaching this the wrong way  :wink:

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2162
  • class keyThumper<T>:ILazy<T>
Re: AcadAcCmColor in LISP?
« Reply #3 on: June 22, 2009, 07:59:27 PM »
Perhaps something Like :

Code: [Select]
;<..>
  (setq acm (vla-GetInterfaceObject
      (vlax-get-acad-object)
      "AutoCAD.AcCmColor.17"))
  (vla-setrgb acm 0 255 0)
  (vla-put-truecolor xtable acm)
  (vla-setrgb acm 255 0 255)
  (vla-setgridcolor xtable acHorzTop acDataRow acm)
  (vla-setgridcolor xtable acHorzBottom acDataRow acm)

;<..>

Code: [Select]
  (setq acm (vla-GetInterfaceObject
      (vlax-get-acad-object)
      "AutoCAD.AcCmColor.17"))

(vlax-dump-Object acm T)

; IAcadAcCmColor: AutoCAD AcCmColor Interface
; Property values:
;   Blue (RO) = 0
;   BookName (RO) = ""
;   ColorIndex = 256
;   ColorMethod = 192
;   ColorName (RO) = ""
;   EntityColor = -1073741824
;   Green (RO) = 0
;   Red (RO) = 0
; Methods supported:
;   Delete ()
;   SetColorBookColor (2)
;   SetNames (2)
;   SetRGB (3)

/// kdub
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2162
  • class keyThumper<T>:ILazy<T>
Re: AcadAcCmColor in LISP?
« Reply #4 on: June 22, 2009, 08:01:39 PM »

of course, that could be
"AutoCAD.AcCmColor.16"
or "AutoCAD.AcCmColor.17"
or "AutoCAD.AcCmColor.18"
or whatever

///kdub
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Lee Mac

  • Seagull
  • Posts: 12937
  • London, England
Re: AcadAcCmColor in LISP?
« Reply #5 on: June 22, 2009, 08:06:50 PM »
Many thanks kdub - I hadn't realised that it would be as complicated as that just to specify a colour...   :lol:

I do have one more question if I may:

In these two lines:

Code: [Select]
  (vla-setgridcolor xtable [color=red]acHorzTop acDataRow[/color] acm)
  (vla-setgridcolor xtable [color=red]acHorzBottom acDataRow[/color] acm)

How did you know to use acHorzTop etc? Is there a reference for these? I could not find them in the Help File   :-(

Again, Thank you.

Lee

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2162
  • class keyThumper<T>:ILazy<T>
Re: AcadAcCmColor in LISP?
« Reply #6 on: June 22, 2009, 10:14:38 PM »
Have a look at the  GetGridColor Method  in the ActiveX (vba) reference

gridLineType

AcGridLineType enum; the type of the grid line

acHorzBottom
 Top or bottom horizontal grid line, based on the flow direction.
 
acHorzInside
 All horizontal grid lines, excluding the top and bottom lines.
 
acHorzTop
 Top or bottom horizontal grid line, based on the flow direction.
 
acInvalidGridLine
 An invalid grid line.
 
acVertInside
 All the vertical grid lines, excluding the farthest left and farthest right grid lines.
 
acVertLeft
 Farthest left grid line.
 
acVertRight
 Farthest right grid line.
 

rowType

AcRowType enum; the row type

acDataRow

acHeaderRow

acTitleRow

acUnknownRow

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Lee Mac

  • Seagull
  • Posts: 12937
  • London, England
Re: AcadAcCmColor in LISP?
« Reply #7 on: June 22, 2009, 10:28:31 PM »
Gotcha - thanks Kerry - I've learnt a lot.  :-)

Lee