Jump to content

Need help with coordinates


cabltv1

Recommended Posts

not sure if this will work or not, but u could give it a try while waiting on lee mac lol

 

replace in2ft in the code he gave you with this and let me know how that outputs

(defun in2ft (num / ft in)
(setq ft (fix (/ num 12.0))
in (rem num 12.0))
(strcat 
(if (= (substr (rtos ft 2 2) ((strlen (rtos ft 2 2))-3)) ".00")
(rtos ft 2 0)
(rtos ft 2 2)
)
(chr 39) (chr 45)
(if (= (substr (rtos in 2 2) ((strlen (rtos in 2 2))-3)) ".00")
(rtos in 2 0)
(rtos in 2 2)
)
(chr 34)))

 

edit: nevermind lol, lee is on the job:wink:

Link to comment
Share on other sites

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    14

  • cabltv1

    9

  • techjunkie09

    1

Top Posters In This Topic

Thanks for the input, but there is a much simpler alternative junkie :P

 

I created that sub-function before I figured out that the rtos function, if provided with an argument of 3, will return the result I needed.

 

The trailing zeros are controlled by the DIMZIN sys var I believe :)

 

Lee

Link to comment
Share on other sites

Lee,

 

I got it to work by changing the DIMZIN Variable to 8 or 12. Anything lower and there was no change.

The "Z" coords are missing 1 zero but I can live with that.

 

Thanks for the suggestion and the original code!

 

 

Techjunkie09,

 

Thanks for your suggestion but made no difference without changing the DIMZIN Variable.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...