Create profile reference to data shortcut using Camber

Hi everyone. I’m trying to use the DataShortcut.CreateReference node from Camber to create profile reference to a data shortcut. I’ve done it for surface and alignment and didn’t have any problem. But when I try to do the same with profiles I get an error (eNullObjectId). I jus’t don’t get how to fix it.

I hope you can help me. Thanks in advance.

Just curious, are the alignments that you referenced the same alignments that the profiles are related to? Creating references to the profiles will also reference their parent alignments by necessity, so I’m curious if it works to not reference the alignments in a separate step.

Also, for future posts like this that are related to Camber, can you please post here?

I’ve managed to avoid that error. But the problem now is that the node doesn’t import the profiles that I need. I gave a description to the node DataShortcutProject.GetDataShortcuts and it gave me the correct profiles. But I use that output in the node DataShortcut.CreateReference it imports aonther alignment and profiles. I hope you can help me.

Should I make this same post there? Or you mean for future posts?

Future posts

The profile names are the same in both node outputs. Can you explain further what the problem is?

I’ll explain the problem. First you need to understand that in a “master file” I have many alignments with different names (such DQ-PL-02 or DQ-MO-01 like in the image) but those alignments have the same names for their profiles (RASANTE_AGUA, RASANTE_PIE_SECO, etc). It’s for standarization. I diferentiate between the profiles with their description (DQ-PL-P2_RASANTE_AGUA).
When I use the DataShortcutProject.GetDataShortcuts node I use a description (in this case DQ-PL-02) and the type to select the data shortcuts to the profile I want. This node gives me what I want.
But when I use the DataShortcut.CreateReference node it creates reference to another alignment (in this case DQ-MO-01) and for some reason get the profiles from that alignment.
For further explanation I’ve tried doing the same for other alignments and it always gives me the same alignment (DQ-MO-01).
I’ve no problem creating references to surfaces and alignments alone.
Hope you can help me. If you need more detail feel free to ask. Thanks again.

Sorry, I followed the exact steps that you described above and did not encounter the same issue. I would double-check the descriptions for each object in the master file and compare with the data references. Sometimes the descriptions do not sync correctly if they have been changed after the shortcuts have been created.