Author Topic: CAD Setup Routine  (Read 62757 times)

0 Members and 1 Guest are viewing this topic.

daron

  • Guest
CAD Setup Routine
« Reply #210 on: February 09, 2004, 01:41:12 PM »
Here we're working with nested lists. Foreach steps through each element of the outermost list, and works on the contents of that element. Typing (car (nth cnt layerlist)) is exactly what the foreach functions is doing, except you don't have to tell foreach how to get to the next element. So, some pseudo-code: foreach list in variable layerlist, save each item in the list to its own variable i.e. (car, cadr, caddr) and process these items as needed before looking at the next list in the main list and continue until every list in the main list has been stepped through.

Sorry if I keep going over the same things, but I want this to click for you. I used repeat for 4 years before I figured out foreach. It wasn't until I asked Mark about it and realized that I was missing one crucial element in my code, to making foreach work. That element was a list. I knew it processed multiple items, but I failed to realize that selection sets and lists are not the same. Anyway, where are we at? What's next?

amgirard2003

  • Guest
CAD Setup Routine
« Reply #211 on: February 09, 2004, 02:04:24 PM »
Quote from: Daron

Sorry if I keep going over the same things, but I want this to click for you. I used repeat for 4 years before I figured out foreach. It wasn't until I asked Mark about it and realized that I was missing one crucial element in my code, to making foreach work. That element was a list. I knew it processed multiple items, but I failed to realize that selection sets and lists are not the same. Anyway, where are we at? What's next?


No problem... I appreciated the extra info that i'm not seeing and when you explain it, it makes a lot more sense... It's clicking really well today..
As we progress through this it will help me out with writting (as CAB would say) sentences...

You mentioned somethin that caught my eye...
You said selection sets and list are not the same?  When you create a selection set aren't you not creating a list of items within that selection?


What about making slides??

SMadsen

  • Guest
CAD Setup Routine
« Reply #212 on: February 09, 2004, 02:38:27 PM »
Andre, lists and selection sets are as different as integers and strings. They are simply different data types that require different handling.

daron

  • Guest
CAD Setup Routine
« Reply #213 on: February 10, 2004, 09:24:50 AM »
That's not to say that you can't convert a selection set into a list of selections. We do it all the time. Mark made a really cool recursive converter that I modified to keep each selection as a selection instead of converting each selection to a vba-object.

Slides? I don't assume you're talking about plastic/metal ramps for playing on. What do you need slides for? What do you want to do with them?

amgirard2003

  • Guest
CAD Setup Routine
« Reply #214 on: February 10, 2004, 10:21:43 AM »
Let's forget about the slide idea and stay with the autolisp
how about my idea with the scale..

First determine if the template is Metric or Imperial..
Prompt the user to enter a scale and set the drawing depending on the scale that was entered.

daron

  • Guest
CAD Setup Routine
« Reply #215 on: February 10, 2004, 10:30:09 AM »
Any ideas how you might determine the type of template? Example: Is there any words in the templates you might look for? That's not the most stable idea. Have a look at dimension variables. If you have express tools, there is a system variable editor that shows most, if not all of the variables, their values and description. Look at any of them starting with dim. I believe there would be some that will tell you what you're looking for. Let me know what you find and we'll start coding from there.

 What would the different scales be that a user, in your company might enter? Why would you change the scale of the drawing? Wouldn't you just draw at 1:1 and set the printer to print at what scale you need, unless of course, you're doing land development?

amgirard2003

  • Guest
CAD Setup Routine
« Reply #216 on: February 10, 2004, 10:50:09 AM »
Well not necessarily change the drawing scale... more of less set the drawing up for plotting at the scale that was entered.

Something like this..

user enters a scale of 1:500 metric..
I would like to create a Viewport function that would reflect the scale that is entered.
If any kind of details entered would be scaled to reflect that scale as well..

It's hard to write down the idea that's in my head.. so you can get a clear idea of what i'm tryin to get too..

amgirard2003

  • Guest
CAD Setup Routine
« Reply #217 on: February 10, 2004, 11:15:03 AM »
I'm still going over the layer routine that you and Stig posted to make sure it fully sinks in and to see things that might not be standing out to me that i should be looking for.

daron

  • Guest
CAD Setup Routine
« Reply #218 on: February 10, 2004, 11:50:07 AM »
That's good to hear. I was going to take a look at it again and see if there isn't some way of processing the inner lists differently, too. I'll let you know what I come up with. As far as the plot scale thing goes, I'll have to ponder that one a bit, but I might have some page setup routines that might be what you're looking for.

amgirard2003

  • Guest
CAD Setup Routine
« Reply #219 on: February 11, 2004, 08:13:26 AM »
Sorry Guys, but i gotta jet for the rest of the week...
Boss just dropped off a huge project that i have to work on..
I'll be back when i'm done..

amgirard2003

  • Guest
CAD Setup Routine
« Reply #220 on: February 24, 2004, 08:05:54 AM »
Hey Guys,
I'm finally back from the garbage I was working on...
I'm not gonna start to vent on that...

I was doin some thinking while i was away and thought after all that i've gone through so far that i've dived in to deep into this project..
I wanna take it slower and learn more of coding and how to put it together..
I wanna work on any examples but easier ones to comprehend would work better for now..

Let me know what you all think?

daron

  • Guest
CAD Setup Routine
« Reply #221 on: February 24, 2004, 08:35:06 AM »
Well, I'm going to be out Wednesday-Friday, so I won't be able to help much, but put up what you'd like to work on and I'm sure there will be others to help out.

amgirard2003

  • Guest
CAD Setup Routine
« Reply #222 on: February 24, 2004, 09:23:09 AM »
Well i don't have any ideas as of yet but looking for some examples that you felt really helped you understand writting and putting code together.