Author Topic: If within if  (Read 3675 times)

0 Members and 1 Guest are viewing this topic.

caddman6425

  • Guest
Re: If within if
« Reply #30 on: January 09, 2012, 12:23:44 PM »
That's my problem, it isn't acting logically. But I can't get it to step, but I think it is at the point when you decide that you want a multi unit and pic tha tyou want (2), it seems as if I have a syntax problem here and it just skips it and goes to the end and operates the single part of the routine.  I don't know any way to say it better that this.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10376
Re: If within if
« Reply #31 on: January 09, 2012, 12:36:27 PM »
Nick did you try the code I posted?

Do you get an error message?
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

caddman6425

  • Guest
Re: If within if
« Reply #32 on: January 09, 2012, 12:44:20 PM »
Not yet, I'm just now getting into the office and I wanted to post that answer, I'll get onto that code and try and see what I did wrong,  I do know what I hadn't finished yet though

caddman6425

  • Guest
Re: If within if
« Reply #33 on: January 09, 2012, 01:51:51 PM »
Boy I sure wish they had a smilie face scratching his head! :)

OK, CAB, why did you put these, (initget (+ 1 2 4)), here?  Oh oh, I just remembered why!  You don't know how good it feels to access a part of my memory that once was lost by those strokes.  Oh, this is so cool, praise GOD!!!!
Thank You CAB, this is now getting fun.

caddman6425

  • Guest
Re: If within if
« Reply #34 on: January 09, 2012, 02:15:22 PM »
OK, I bite, why the p2 after the shapename function?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10376
Re: If within if
« Reply #35 on: January 09, 2012, 02:39:41 PM »
Rather than making p2 a global variable I sent it as an argument to the sub-function.
The p in the function keeps it local to that function.

I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

caddman6425

  • Guest
Re: If within if
« Reply #36 on: January 09, 2012, 02:49:49 PM »
Uh, you do know that p2 is already called as a point, don't you?  Also, when you call the p before the "_Medium, _High, and the "" "" "",  it seems to me that it is going to bomb the command string.  Those are a specific set of answers to question that will define a structural member shape and style.  Or am I missing something?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10376
Re: If within if
« Reply #37 on: January 09, 2012, 03:27:02 PM »
I am using ACAD 2006 so I can not test the routine but it appears to me that my modifications should work as intended.
The variable p2 is assigned a value at line 105 and never changed again. The sub function calls are later in the routine
and therefore use the same p2 as you intended. Only difference is that I have made it an argument in the sub function call.
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

caddman6425

  • Guest
Re: If within if
« Reply #38 on: January 09, 2012, 03:41:31 PM »
Just tried it on the command line and using the 'p' before the _Medium and so forth doesn't work.  As far as the p2 is concerned, it is only used for a point to define the position of the baseline in the profile that is defined and then that profile is deleted after the shape is defined.  What am I missing here, it seem that you are defining that point and defining it again as just p

CAB

  • Global Moderator
  • Seagull
  • Posts: 10376
Re: If within if
« Reply #39 on: January 09, 2012, 03:48:39 PM »
I'm a little confused.
Does the routine I posted work?

Do you call the sub-function shapename from the command line for any reason?
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

caddman6425

  • Guest
Re: If within if
« Reply #40 on: January 09, 2012, 03:55:51 PM »
On the command line you type out what is in that function, but it can be used 4 different times.  I'm lost, where do you call out 'p' as equal to 'p2'?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10376
Re: If within if
« Reply #41 on: January 09, 2012, 04:03:38 PM »
(setq p2 '(10 25))
(shapename p2) ; sends the value (10 25) to the sub function shapename
(defun shapename (p)  ; this assigns (10 25) to the variable p
when shapename returns to the calling rutine the variable p is destroyed.

I have to go off for several hours..
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

caddman6425

  • Guest
Re: If within if
« Reply #42 on: January 09, 2012, 04:34:52 PM »
That's not what I'm asking it to do, the memshna is used the same but in diferent conditions.  Here are the questions that the command line asks and the answers I put.
Code: [Select]
Command: _-AECSMEMBERSHAPEDEFINE
Shape [New/Copy/Edit/Purge/?]: n
New style name or [?]: 2x12

New style 2x12 created.

Shape definition [Name/Description/Graphics]: G

Shape designation [Low detail/Medium detail/High detail]: L

Select lines, arcs, circles, or polylines for Low Detail: Here I put (entlast) and it returns: 1 found

Select lines, arcs, circles, or polylines for Low Detail: <enter out of command>

Insertion point or [Add entity]:Here is put the defined point 'p2'

Shape designation [Low detail/Medium detail/High detail]: M

Select a closed polyline, spline, ellipse, or circle for an outer ring:Here I put (entlast)

Insertion point or [Add ring/Centroid]:Here is put the defined point 'p2'

Shape designation [Low detail/Medium detail/High detail]: H

Select a closed polyline, spline, ellipse, or circle for an outer ring:Here I put (entlast)

Insertion point or [Add ring/Centroid]:Here is put the defined point 'p2'

Shape designation [Low detail/Medium detail/High detail]: <enter out of command>

Shape definition [Name/Description/Graphics]: <enter out of command>

Shape [New/Copy/Edit/Purge/?]: <enter out of command>

So you see the line of code is just the answers to the above question, and I don't need 'p'

BlackBox

  • King Gator
  • Posts: 3745
Re: If within if
« Reply #43 on: January 09, 2012, 05:37:55 PM »
You, who shall not be named, may want to reconsider posting your phone number publically in your signature. Just saying.
"How we think determines what we do, and what we do determines what we get."

caddman6425

  • Guest
Re: If within if
« Reply #44 on: January 09, 2012, 05:55:08 PM »
Oooouh, you think?????