Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use GetCellStyles method

1 REPLY 1
Reply
Message 1 of 2
david.rock
474 Views, 1 Reply

How to use GetCellStyles method

Hello,

 

My script for going through table styles is almost complet except for the Cell Styles.

 

I can see that the method is there:

; IAcadTableStyle: AutoCAD IAcadTableStyle Interface ; Property values: ;   Application (RO) = #<VLA-OBJECT IAcadApplication 0000000140012308> ;   BitFlags = 3 ;   Description = "Standard" ;   Document (RO) = #<VLA-OBJECT IAcadDocument 0000000030b71ed8> ;   FlowDirection = 0 ;   Handle (RO) = "678" ;   HasExtensionDictionary (RO) = -1 ;   HeaderSuppressed = 0 ;   HorzCellMargin = 1.25 ;   Name = "ARIALN" ;   NumCellStyles (RO) = 3 ;   ObjectID (RO) = 3309 ;   ObjectID32 (RO) = 3309 ;   ObjectName (RO) = "AcDbTableStyle" ;   OwnerID (RO) = 3314 ;   OwnerID32 (RO) = 3314 ;   TemplateId = 0 ;   TemplateId32 = 0 ;   TitleSuppressed = 0 ;   VertCellMargin = 1.25 ; Methods supported: ;   CreateCellStyle (1) ;   CreateCellStyleFromStyle (2) ;   Delete () ;   DeleteCellStyle (1) ;   EnableMergeAll (2) ;   GetAlignment (1) ;   GetAlignment2 (1) ;   GetBackgroundColor (1) ;   GetBackgroundColor2 (1) ;   GetBackgroundColorNone (1) ;   GetCellClass (1) ;   GetCellStyles (1) ;   GetColor (1) ;   GetColor2 (1)

 

However I am having trouble using it in a function:

Following is what I have

(setq GetCellStyles (vlax-invoke-method  TableStyle 'GetCellStyles 0))

(vlax-dump-object MergeProp_GetCellStyles T)

(vlax-for MergeProp_cells MergeProp_GetCellStyles

  (progn

    (vlax-dump-object MergeProp_cells T)

  )

)

 

GetCellStyles is nil

 

I have trouble finding the expected

 

Thanks so much

David

 

1 REPLY 1
Message 2 of 2
pbejse
in reply to: david.rock

Try GetCellStyle

 

Not GetCellStyles <-- no "s"

 

(setq GetCellStyles (vlax-invoke-method  TableStyle  'GetCellStyle 0 0)) <-- missing argument , shoudl be row AND  column

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost