Author Topic: issues with x,y extraction and alteration coding, please help.  (Read 4701 times)

0 Members and 1 Guest are viewing this topic.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Code: [Select]
(setq base_point (getpoint "\nSpecify base point: "))
(setq ptascii_x (car base_point))
(setq ptascii_x (rtos ptascii_x 2 2))
(setq ptascii_y (cadr base_point))
(setq ptascii_y (rtos ptascii_y 2 2))
(setq point_calc (rtos (- ptascii_y 4.5)))

Quote
Specify base point: *Cancel*
bad argument type: numberp: "531632.7"
« Last Edit: April 11, 2008, 01:42:17 PM by alanjt »
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

ronjonp

  • Needs a day job
  • Posts: 7529
Re: what's wrong with this code?
« Reply #1 on: April 11, 2008, 01:30:01 PM »
Your trying to subtract from a number that you already converted to a string:

(setq base_point (getpoint "\nSpecify base point: "))
(setq ptascii_x (car base_point))
(setq ptascii_x (rtos ptascii_x 2 2))
(setq ptascii_y (cadr base_point))
(setq point_calc (rtos (- ptascii_y 4.5)))


Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: what's wrong with this code?
« Reply #2 on: April 11, 2008, 01:32:33 PM »
Whats wrong with the subject line of your post?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: issues with x,y extraction and alteration coding, please help.
« Reply #3 on: April 11, 2008, 01:43:34 PM »
thanks ronjonp i knew it was something silly. Se7en, is that a better subject line, sorry about being ambiguous?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

daron

  • Guest
Re: issues with x,y extraction and alteration coding, please help.
« Reply #4 on: April 11, 2008, 01:57:55 PM »
Would "why can't I subtract a real from a string" be a better subject line, 7? :-D

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: issues with x,y extraction and alteration coding, please help.
« Reply #5 on: April 11, 2008, 02:04:09 PM »
I dunno...To be honest, I never read the post (Nothing personal, I saw a response and assumed it was taken care of).

A good subject line is for your benefit not mine (well it is in a obscure way.). You get better help if people know what the question is before they read the actual question.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: what's wrong with this code?
« Reply #6 on: April 11, 2008, 02:10:10 PM »
Whats wrong with the subject line of your post?
A: Se7en cannot understand it as it relates to the subject matter presented by the question.

Q: Do I win the prize?
Q: Is there a prize?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: issues with x,y extraction and alteration coding, please help.
« Reply #7 on: April 11, 2008, 02:13:09 PM »
How should i know?! Did you answer correctly?
I didn't know there was a contest.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

daron

  • Guest
Re: issues with x,y extraction and alteration coding, please help.
« Reply #8 on: April 11, 2008, 02:40:54 PM »
What was the original name?

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: issues with x,y extraction and alteration coding, please help.
« Reply #9 on: April 11, 2008, 02:55:56 PM »
Quote
what's wrong with this code?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: issues with x,y extraction and alteration coding, please help.
« Reply #10 on: April 11, 2008, 03:22:05 PM »
How should i know?! Did you answer correctly?
I didn't know there was a contest.
I'll take that as a resounding NO on both accounts
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

daron

  • Guest
Re: issues with x,y extraction and alteration coding, please help.
« Reply #11 on: April 11, 2008, 03:57:02 PM »
Quote
what's wrong with this code?
:-o Hmm. I see nothing wrong with that title. I've seen worse. At least that let's us know that you have tried something and it's not quite working.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: issues with x,y extraction and alteration coding, please help.
« Reply #12 on: April 11, 2008, 04:08:29 PM »
Quote
what's wrong with this code?
:-o Hmm. I see nothing wrong with that title. I've seen worse. At least that let's us know that you have tried something and it's not quite working.

i'm not trying to make an enemy here, but seriously Se7en?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: issues with x,y extraction and alteration coding, please help.
« Reply #13 on: April 11, 2008, 05:28:14 PM »
Not `trying'? Your not `trying' by posting a private message in a public forum?

But to answer your question; whats wrong with me trying to explain where im coming from so you dont take what i say the wrong way (get angry)?

What you just did (post a PM in public) is NOT cool, not cool by any means. If you had a problem with what i PM'ed you, you should have either reported me to a moderator or just wrote me back saying that you didnt not want to speak with me.

Am i angry? Yeah kinda.
*Was* i angry? Not at all.
Was i trying to make you angry? Never!
Did you make an enemy? Not with me.
(but we will see how other people react to you posting PMs.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: issues with x,y extraction and alteration coding, please help.
« Reply #14 on: April 11, 2008, 05:36:32 PM »

John, since you chastised Alan publically perhaps your link and reasoning may have been better posted as well .. takes the same energy and everyone benefits.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: issues with x,y extraction and alteration coding, please help.
« Reply #15 on: April 11, 2008, 06:25:22 PM »
Kerry, I see your point. I will try better next time.

But i still dont like the posting of PMs...even if i was in the wrong.

***

I will write up a better explanation and post it.

TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: issues with x,y extraction and alteration coding, please help.
« Reply #16 on: April 11, 2008, 06:29:31 PM »
cool

I understand the situation of work induced brevity though :-)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: issues with x,y extraction and alteration coding, please help.
« Reply #17 on: April 11, 2008, 06:34:16 PM »
Thanx I'm glad someone does.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Re: issues with x,y extraction and alteration coding, please help.
« Reply #18 on: April 11, 2008, 09:41:22 PM »
Ok here are my explanations. Upon a re-read of what I typed up, it doesnt really sound all that coherent but I think we've beaten this horse long enough. Im not angry, nor should I be. this was a misunderstanding; in my hast I offended and ...well who cares, its over now. Here is my type up.

***

There are many aspects to consider here--and I will by no means cover them all but I will try to hit on some of the major ones--and im not really going to spend a whole lot of time explaining either (Im just going to say it and let you draw our own conclusions).

First a quote from the link provided in PM.

Quote from: Eric Steven Raymond
Use meaningful, specific subject headers

On mailing lists, newsgroups or Web forums, the subject header is your
golden opportunity to attract qualified experts' attention in around
50 characters or fewer. Don't waste it on babble like ``Please help
me'' (let alone ``PLEASE HELP ME!!!!''; messages with subjects like
that get discarded by reflex). Don't try to impress us with the depth
of your anguish; use the space for a super-concise problem description
instead.

One good convention for subject headers, used by many tech support
organizations, is ``object - deviation''. The `object' part specifies
what thing or group of things is having a problem, and the `deviation'
part describes the deviation from expected behavior.

Stupid:
    HELP! Video doesn't work properly on my laptop!
Smart:
    X.org 6.8.1 misshapen mouse cursor, Fooware MV1005 vid. chipset
Smarter:
    X.org 6.8.1 mouse cursor on Fooware MV1005 vid. chipset - is
    misshapen

The process of writing an `object-deviation' description will help you
organize your thinking about the problem in more detail. What is
affected? Just the mouse cursor or other graphics too? Is this
specific to the X.org version of X? To version 6.8.1? Is this specific
to Fooware video chipsets? To model MV1005? A hacker who sees the
result can immediately understand what it is that you are having a
problem with and the problem you are having, at a glance.

More generally, imagine looking at the index of an archive of
questions, with just the subject lines showing. Make your subject line
reflect your question well enough that the next guy searching the
archive with a question similar to yours will be able to follow the
thread to an answer rather than posting the question again.

If you ask a question in a reply, be sure to change the subject line
to indicate that you're asking a question. A Subject line that looks
like ``Re: test'' or ``Re: new bug'' is less likely to attract useful
amounts of attention. Also, pare quotation of previous messages to the
minimum consistent with cluing in new readers.

Do not simply hit reply to a list message in order to start an
entirely new thread. This will limit your audience. Some mail readers,
like mutt, allow the user to sort by thread and then hide messages in
a thread by folding the thread. Folks who do that will never see your
message.

Changing the subject is not sufficient. Mutt, and probably other mail
readers, looks at other information in the e-mail's headers to assign
it to a thread, not the subject line. Instead start an entirely new
e-mail.

On Web forums the rules of good practice are slightly different,
because messages are usually much more tightly bound to specific
discussion threads and often invisible outside those threads. Changing
the subject when asking a question in reply is not essential. Not all
forums even allow separate subject lines on replies, and nearly nobody
reads them when they do. However, asking a question in a reply is a
dubious practice in itself, because it will only be seen by those who
are watching this thread. So, unless you are sure you want to ask only
the people currently active in the thread, start a new one.
LINK: [ http://catb.org/~esr/faqs/smart-questions.html#intro ]

NOTE: Obviously not all that applies to us but most of the concepts are sound.

Now what does that boil down to? Well, in more or less words, if [you] dont catch [my] attention with a subject line, I am not going to read the question. In fact, the only reason I entered this thread is because `poor subject lines' are kind of an annoyance of mine. And the less people you have reading your posts, the less help you get. Im not trying to seem conceded or anything, im just stating that most people dont bother reading unless they are ``involved'' somehow (``Oh, I know that one!'' or ``I'm good with that, I bet I can help.''). 

This may seem like a reach, but theSwamp benefits too. We have an amazing group of people here. Ive read the posts on many forums and seen many questions. I dont think there is much we havent already or can not answer. we have Professional, Student, and Amateur programmers here. Providing quick accurate answers helps to prove that theSwamp is the place to go, the best and only place.

One more.
I classify this one under the ``wasted time/effort'' classification; If im not sure of the problem, I have to ask that many more return questions in an effort to understand.  where if I can act upon and test predetermined conceptions with a properly worded subject line/question I can (hopefully) get your problem solved right away (first response).

Okay, there are tons of excuses/reasons and we can be here all day listing and discussing them but I think that is enough for now. 

If an when you get time, read that link. It is a very good read.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2139
  • class keyThumper<T>:ILazy<T>
Re: issues with x,y extraction and alteration coding, please help.
« Reply #19 on: April 12, 2008, 12:43:10 AM »
>>>>>>>>>>
LINK: [ http://catb.org/~esr/faqs/smart-questions.html#intro ]

NOTE: Obviously not all that applies to us but most of the concepts are sound.

>>>>>>
If an when you get time, read that link. It is a very good read.



Quote from:  the link  :-)
....... Grovelling is not a substitute for doing your homework

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.