Hello,
As you've discovered, it looks like LT ignores decimal precision from styles when writing the coordinates from ID to environment variables (which are written to and read from the Windows Registry).
All is not lost, though.
I've written a VBScript file which reads your style's precision (DIMDEC) and the custom environment variable "pickpoint".
This VBScript file rounds the coordinates to your DIMDEC precision and overwrites the new data back into the Registry.
This doesn't work for Architectural units.
You'll need several items to do this:
1) The VBScript code (include below) IT has comments to help explain.
2) Windows Script Host (WSH) which you get from Microsoft (ver. 5.7)
3) The correct Registry paths to custom LT environment variables (sse below).
4) New LT macro code (included below).
5) Add a "Batching" folder to your list of LT support paths.
#1: Copy and save this text in a text file named "TrimLastpointPrecision.vbs" (it must have a vbs extension):
'TrimLastpointPrecision.vbs
'Kevin P. Chandler 2008
'Reads the Windows Registry for custom AutoCAD environment variables to
'set a saved coordinate set to a specific decimal precision.
Set objShell = WScript.CreateObject("WScript.Shell")
'Read decimal precision environment variable from the Registry.
strDIMDECPRECISION = objShell.RegRead _
("HKEY_CURRENT_USER\Software\Autodesk\AutoCAD LT\R13\ACADLT-6001:409\FixedProfile\General\DIMDECPRECISION")
'Convert the precision to an integer.
intDIMDECPRECISION = CInt(strDIMDECPRECISION)
'Read pickpoint environment variable from the Registry.
Set objShell = WScript.CreateObject("WScript.Shell")
strPickpoint = objShell.RegRead _
("HKEY_CURRENT_USER\Software\Autodesk\AutoCAD LT\R13\ACADLT-6001:409\FixedProfile\General\pickpoint")
'Strip the XYZ coordinates into an array of coordinates.
arrCoordinates = Split(strPickpoint, ",")
'Convert each coordinate into an integer to remove all decimal places.
for i = LBound(arrCoordinates) to UBound(arrCoordinates)
'Format each coordinate to AutoCAD's DIMDEC variable.
arrCoordinates(i) = FormatNumber(CDbl(arrCoordinates(i)), intDIMDECPRECISION)
next
'Rebuild the pickpoint.
strPickpoint = CStr(arrCoordinates(0)) & ", " & CStr(arrCoordinates(1))
'The line above concatenates X and Y, but not Z.
'Delete the apostrophe from the beginning of the next line to include Z in the new pickpoint.
'strPickpoint = strPickpoint & ", " & arrCoordinates(2)
'Write the rebuilt pickpoint environment variable back to the Registry.
'This overwrites the original pickpoint variable.
'If you want to keep the original values, then change "pickpoint" in the RegWrite command below
'to some other value, like "pickpoint2".
'If you do change pickpoint to a new name, adjust your menu code accordingly.
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.RegWrite _
"HKEY_CURRENT_USER\Software\Autodesk\AutoCAD LT\R13\ACADLT-6001:409\FixedProfile\General\pickpoint", _
strPickpoint, "REG_SZ"
'Reread the Registry to force the update in time for AutoCAD to use in the remainder of the macro.
Set objShell = WScript.CreateObject("WScript.Shell")
strPickpoint = objShell.RegRead _
("HKEY_CURRENT_USER\Software\Autodesk\AutoCAD LT\R13\ACADLT-6001:409\FixedProfile\General\pickpoint")
'End TrimLastpointPrecision.vbs
#2: WSH is need to run vbs scripts.
In a Windows Run dialog, type cmd to open a command window. In the cmd window, type cscript and Enter.
If Windows says huh?, you need to get WSH from billg.
#3: Custom LT environment variables, such as "pickpoint" are stored in the Windows Registry.
They're stored in an AutoCAD version-specific location, which may not match the paths in the VBS code above (mine).
In LT, use SETENV to create a custom var.
Use "pickpoint" for the var's name and something odd/unique for its value, like ZQZQZQZQ. (Something easily searched for.)
In a Windows Run window, type REGEDIT.
WARNING: There's no UNDO in the Registry Editor and there's no Save because ALL CHANGES ARE IMMEDIATE, whether they're good or bad. So be careful.
You've been warned.
Search for the value you entered in LT, like my ZQZQZQZQ.
When it's found, review the path in the status bar at the bottom of REGEDIT.
(HKEY_CURRENT_USER may be abbreviated as HKCU)
If it's different than the code, edit the code (in all places) to your Registry path.
Save the VB code.
Close REGEDIT.
#4) You'll need this new LT menu code (one line):
^C^C_setenv;DIMDECPRECISION;$M=$(getvar,DIMDEC);_id;\_setenv;pickpoint;$M=$(getvar,lastpoint);_ai_startapp;"TrimLastpointPrecision.vbs";delay 1500;_leader;@;\;$M="$(getenv,pickpoint)";;^M;
When the vbs code is run, a command window opens briefly and closes automatically.
The DELAY (currently 1.5 seconds) is there to allow the vbs code to do its thing before LT continues.
Don't shorten this DELAY too much or the whole thing doesn't work.
#5: (Optional) I recommend you create a "Batching" folder and add it to your list of LT support paths (OPTIONS).
If you're networked, create it on a mapped drive, like:
Z:\AutoCAD LT Support\Batching
If you don't save the VBScript file where LT can find it, you'll need to add the vbs path to your menu code.
This is a maintenance pain. Add one entry to your list under "Support File Search Path" and your done.
While you're at it, do one for your LT scripts, too:
Z:\AutoCAD LT Support\Scripts
Now LT scripts (scr) can be run from menu code w/o paths.
Leave spaces out of the scr file names and you don't need to quote them.
I've tested this on my LT and it works.
I hope it works for you, too.