Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Member
ronschuster
Posts: 3
Registered: ‎10-08-2012
Message 1 of 2 (273 Views)

Incorrect ATTEXT file

273 Views, 1 Replies
10-08-2012 01:27 PM

I am having a problem with ATTEXT giving me inconsistemt results. This is in an application that has been running for years at dozens of sites, but one new customer is having a problem with it. I can't figure out what is different.

They're reporting it in Acad 2011 but I can reproduce it here in Acad 2008 with one of their dwg files.

 

I am using this command in an AutoLisp routine but I can reproduce the problem sometimes pasting this same command in the command prompt.

(command "ATTEXT" "S" (strcat PcmsDir "PALTMPLT") (strcat SwapDir "PALXTRAC"))

My template file is

BL:X       n009004
BL:Y       n009004
BL:Z       n009004
BOX-PARMS  c021000
ITEM-PARMS c021000
BL:LAYER   c040000
BL:HANDLE  c016000
PCMS-ID    c100000

In one or more of the coordinate fields I am getting what appears as random out-of-range values. When it happens I get the "Field overflow in record error". It seems to happen "at random". The problem comes and goes repeatedly. I can't figure out what triggers it or makes it go away.  When it works right the file looks fine (for the sake of brevity I truncated the lines after the 5th field in these example output files) :

   2.5608   6.6031   0.00000.0,-0.2,1           0.0,-0.3,C                                       
   3.5263   7.3965   0.00000.0,-0.2,1           0.0,-0.3,C                                       
   7.8047  10.0465   0.00000.0,-0.2,1           0.0,-0.3,C                                     
   8.7488  10.4396   0.00000.0,-0.2,1           0.0,-0.3,C                                    
   9.5141  10.1966   0.00000.0,-0.2,1           0.0,-0.3,C                                       
  11.0232   9.5247   0.00000.0,-0.2,1           0.0,-0.3,C                                     
  11.3880   8.7742   0.00000.0,-0.2,1           0.0,-0.3,C                                       
  11.0229   7.9203   0.00000.0,-0.2,1           0.0,-0.3,C                                       
   8.7485   6.6195   0.00000.0,-0.2,1           0.0,-0.3,C                                        
   6.8461   6.8911   0.00000.0,-0.2,1           0.0,-0.3,C 

But then later I get junk in the Z field:

   2.5608   6.60311060381980.0,-0.2,1           0.0,-0.3,C                                          
   3.5263   7.39651060381980.0,-0.2,1           0.0,-0.3,C                                        
   7.8047  10.04651060381980.0,-0.2,1           0.0,-0.3,C                                       
   8.7488  10.43961060381980.0,-0.2,1           0.0,-0.3,C                                          
   9.5141  10.19661060381980.0,-0.2,1           0.0,-0.3,C                                           
  11.0232   9.52471060381980.0,-0.2,1           0.0,-0.3,C                                             
  11.3880   8.77421060381980.0,-0.2,1           0.0,-0.3,C                                            
  11.0229   7.92031060381980.0,-0.2,1           0.0,-0.3,C                                           
   8.7485   6.61951060381980.0,-0.2,1           0.0,-0.3,C                                          
   6.8461   6.89111060381980.0,-0.2,1           0.0,-0.3,C                                           

 and then another time all three coordinates:

761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C
761995717-743608407619957590.0,-0.2,1           0.0,-0.3,C

 another time it was just X and Z. You get the point.

 

All of these examples were produced in the same autocad session with the same drawing, the same command, and the same template file. It only seems to affect the coordinate fields. Does anyone have any clue what could be going on here?

 

 

 

Member
ronschuster
Posts: 3
Registered: ‎10-08-2012
Message 2 of 2 (226 Views)

Re: Incorrect ATTEXT file

10-19-2012 11:59 AM in reply to: ronschuster

One more piece of information I just discovered. The problem only occurs if an entity on the drawing is selected. If I first make sure there is nothing selected first, then it works right.

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.