How to map one list to match a second list that will become an overall list

Hi All,

I thought this would be simple, but I’ve run into an issue creating an overall list of station and offsets from other lists. The script originally used a excel file with station and offsets to insert cogo points, pretty simple, then I got the idea of removing the excel file, like I said, I thought it would be simple until I couldn’t get the lists to match the excel sequence. the excel file is pasted into the image in lower right corner. I looked everywhere and couldn’t find a sample that showed how I could create the offset list by its point positions in the list as I was building the list or how to map the positions in the offset file to the corresponding station.

Any links or videos that you can direct me to would be great.
Thank you
John

list of lights.dyn (79.1 KB)

LIGHT LIST OFFSETS_2024-09-09_01-21-12.pdf (943.0 KB)

An image would go a long way. It will help us understand your context and maybe point out a simple fix. It would also be helpful if you could show us the outcome you’re after. It’s a lot harder to suggest a solution if we don’t know exactly what it should look like.

It sounds like you’re just trying to match up items in separate lists. If that’s the case, I suggest looking into dictionaries. There are plenty of threads that discuss how to use dictionaries for mapping values or identifiers across disparate datasets.

4 Likes

Thanks Nick,

I guess I wasn’t clear, the excel clip in the lower right is the format goal for the list.
The station values and arrangement are correct, they match the excel values, however the offset values need to be arranged somehow to match the station values like in the excel clip, that’s where I have no idea what node to use to accomplish that task. I’ll do as you suggest, I’ll check out dictionaries.
Thank you.

Q: what’s the difference between a pdf and a jpg, aren’t they both images?

John

A PDF is a document and a jpg is an image that can be embedded on the website.

The PDF you uploaded needs to be downloaded before we can view it. I would never download a random PDF on a forum as PDFs can contain malicious code/links/exploits etc. So if i saw you asking for help and I need to download a PDF to even know what you’re doing, bluntly put i would just not help besides explain to you why…

Instead of users being able to help you by simply looking at a screenshot, we need to download a DYN file, open it, download a pdf and open it, hope we are using the same version of dynamo and all the packages. A lot of users will simply skip your question because they cant see what you want without downloading your files :slight_smile:

In addition to what @Garbage_Collector mentioned, it’s also easier to follow the “story” of changing images and updated logic simply by seeing it in the natural progression of the thread. If you make changes or repost a pdf, there’s no way to know that the file has changed without opening it. Right now your pdf is illegible. None of the node titles are visible so it’s nearly impossible to follow your logic. That’s causing additional effort on everyone’s part to even get started with the basics.

I know it may not seem like much, but when users are dealing with tens or even hundreds of new posts, every little bit matters.

Additionally, when we ask for an example of your expected outcome, we’re mostly talking about how your individual outputs map to your specific format. If the offset values don’t match in order now, how are we supposed to order them (relative to each other)? If the values come directly from elements, how are the elements related?

got it, thank you

Nick,

images from now on. Thanks, MVE1112 for explanation.

Started looking at dictionaries, it looks like I boxed myself into corner by the way the offset lists were made, I get that paring them after the fact looks difficult or even possible for me, but I’m new to dynamo, so I made the list disconnected because I didn’t see another way to make the list. Maybe keeping it linked to excel is a better solution. nonetheless I’ll continue to see how I can use dictionaries
in the future for things similar to this.

Thank you,
John

I agree with everything said about the PDF vs embedded image with one added note…

Any file can contain malicious code/links/exploits etc… This means viewing the GIFs (which the forum allows), PNGs (which the forum allows), the JavaScript (which the forum allows), WebP (which the forum allows)… Heck the in browser spellcheck has even been used for exploits…

So while downloading a PDF you aren’t sure of isn’t necessarily advisable, downloading anything is a risk. And while the forum (and web pages everywhere) does what it can to keep you safe, it’s on us as end users to keep ourselves and each other safe.

And beyond exercising some caution in what sites you visit and what you review/download), updating and patching the software you use (yes, all of it, including Revit, AuroCAD, etc.) is the best action you can take to keep yourself and your firm safe.

1 Like

Was able to work thru list issue and complete task.

Thank you,
John

2 Likes