Visual LISP, AutoLISP and General Customization

Reply
Contributor
david.rock
Posts: 11
Registered: ‎04-02-2003
Message 1 of 2 (107 Views)

How to use GetCellStyles method

107 Views, 1 Replies
06-22-2012 12:30 AM

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

 

*Expert Elite*
pbejse
Posts: 2,406
Registered: ‎11-24-2009
Message 2 of 2 (103 Views)

Re: How to use GetCellStyles method

06-22-2012 01:26 AM 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

 

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community