- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Any help greatly appreciated.
As usual, I am way over my head is lisp again, working on a program to take dynamic block properties from a number of (up to 30) dynamic blocks and temporarily store the data, then use the stored data to configure a "conglomerate" dynamic block which will represent the plan view of the multiple dynamic blocks and contain their data. I have many parts working already, but I am struggling with some sorting functions I haven't ever had to use before.
So I have created a program that prompts the user to select all the dynamic blocks that represent an elevation view of a belted conveyor unit. the unit consists of any combination of 6 dynamic blocks - it has to have a drive bed block and also two end pulleys which could be in any one of 3 other kinds of beds, and two more types of the blocks are simply intermediate beds - they are beds that make the unit longer by varying lengths. So what I am saying is that when the user selects blocks, he will get a filtered pickset of up to 30 dynamic blocks which will be of the 6 possible bed definitions.
Each of the six definitions has some common data which I am storing in association lists named BEDINFO_0, BEDINFO_1, BEDINFO_2.... up to BEDINFO_30. This should be enough. My program is creating these stored lists as required, so there will only be as many as required, usually about 10 - 15 or less.
I have gotten to the point that I have the association lists made, but I am having trouble figuring out how to find the important data from them.
For example, I'll need to check (car (cdr (nth 5 BEDINFO_EACHNUMBER))) to find the minimum x value. I'll have to do this to different nth numbers to check for maximum y value, or to find other stored information like degrees of rotation, etc. Of course, I just supplied the EACHNUMBER for this post to convey an issue- each association list will be called BEDINFO_X and I'll need to check up to a flexible number of them to find the data I need, (BEDINFO_0, BEDINFO_1, ETC..) you get the idea.
I figure that mapcar and apply will be needed to create a function to do this but I can't figure out exactly how.
I know the number of times to index BEDINFO_ by (sslength finalss), so starting with (car (cdr (nth 5 BEDINFO_0))) I have to search for the min coordinate x value (for this example) until I reach the number of BEDINFO_ sets represented by (sslength finalss).
I think that is enough info to figure out how to construct such a function.
Anyone with more experience care to enlighten me?
Thanks in advance,
Ron
Solved! Go to Solution.