Get Table Cell Text without formatting

Get Table Cell Text without formatting

Anonymous
Not applicable
1,475 Views
5 Replies
Message 1 of 6

Get Table Cell Text without formatting

Anonymous
Not applicable

Perhaps I'm overlooking things somewhere but I can't find enough information to resolve this issue.

 

Background: I have PASTESPEC an AutoCAD Entity table into AutoCAD after copying it from excel.

LatLong Table.JPG

 

I am testing code to confirm the Headers of the table, however I cannot find a way to return the EXACT Cell Text as a string. Can somebody critique my code please?! Thank you

Lat Cell Text.JPG

(defun c:EZGEOMARKER (/ GeoTable LatCell)
  
;;;;;Load the extended AutoLISP functions related to ActiveX support
(vl-load-com)
  
;;;;;Select table with data for GeoMarkers
(setq GeoTable (entsel "\n(EZGEOMARKER) Please select AutoCAD Table with Latitude/Longitude/Note: "))

;;;;;Set variables which will be tested later
(setq LatCell (vla-gettext (vlax-ename->vla-object (car GeoTable)) 0 0))

(alert LatCell)

);defun
0 Likes
Accepted solutions (1)
1,476 Views
5 Replies
Replies (5)
Message 2 of 6

devitg
Advisor
Advisor
Accepted solution

The text it is a MTEXT, with it's format. You need to UNFORMAT it. 

Message 3 of 6

Anonymous
Not applicable

Thank you for the response. I was thinking it might be so. How might I approach that with LISP in this routine? Is that possible with LISP?

 

~D

0 Likes
Message 4 of 6

devitg
Advisor
Advisor
0 Likes
Message 5 of 6

Anonymous
Not applicable

devitg,

 

Your link was useful and ultimately led me to the following..

 

https://cadabyss.wordpress.com/2010/01/04/stripmtext-v5-0/

 

Very awesome of them to distribute this. Such a large amount of coding work! I have chosen to incorporate their function into my LISP so that the table will be stripped after being chosen. Wish it could be easier. Thanks again

 

~D

0 Likes
Message 6 of 6

devitg
Advisor
Advisor

John Uhden  is an often and daily colaborator .  

0 Likes