Hello Everyone,
I’m having problems with this issue called “Dereferencing a non-pointer.”
I select all categories in my project and then i obtain a list of all elements for those categories. I want to extract the “ID” and the “key note” of all element. Returns error for both two but for the first one i get the values, for the second one i have a empty list.
Can anyone help me, please?
Wat do the warnings tell you?
what does nota chiava mean? not key?
i think some elements don’t have that parameter
1 Like
Try this
remove empty list at the beginning
what package is collect elements?
1 Like
Warning: Internal error, report: cancellation of the reference to a non-pointer.
yes, “nota chiave” is key note. In the project this parameter is compiled
put in youre code block
2…5; see what happens
or
1;
what package is collect elements?
You’re basically selecting every element by its category, so there are two issues I see with this agressive collection method when it comes to your desired output:
-
Cleaning the list will certainly help.
-
Confirm that every element type in each category has a keynote parameter to work with. I doubt the following element types have this parameter available: views including filters and templates, revisions, sheets, parameters themselves, project information, electrical loads, area separation lines, sketch lines, text, dimensions, keynotes themselves (yep you selected those too).
Instead I would recommend you select all elements (as you are is fine but a more controlled method may be in order), ask if the parameter exists, filter out elements which don’t have the parameter, and then get the values.
1 Like
For few element i have no error but i don’t understand why the “key note”(Nota chiave) is empty when in the project is compiled
it is the simply python code that i post in the picture 
totaly agree
but the strange thing is that in mine graph i select a lot of categories too.
I get only a warning when at the beginning the list contains an empty list.
is the first list not a empty list then it works fine. even if the element doesn’t have that parameter
Thats why i dropped the first few empty list with the list.getitemattindex node
oh sorry… it’s bakery package! 
maybe the problem is that “key note” is a type parameter and not an instance parameter!
Please expand on that node so others can see what the solution was.
Gives the node Element.Id in this graph also a warning or not?
no there is not error but the ID is refered to the type and not to the instance