Blocks…
I’m trying to use the RhinoCommon documentation to make C# scripts in Grasshopper, but I there’s all these missing summaries…
Please @dale , could you write a short description for what these properties are ?
In particular, Id’ like to know what the “IsDeleted” property.
Does it mean that there is no instance of that block definition ?
If that’s the case, I find the name of the property misleading…
Also, in the Python example (wow, Python sure is concise compared to C# !), the “.isDeleted” property is not even used !!!
I wonder what you need those properties for, it might be that those are in RhinoCommon just for the fact that those properties exist, rather than having real use for scripting/programming.
Well, the “IsDeleted” property has the luxury of having sample scripts !
Doesn’t that mean that it might be useful to a dev’ ?
The summaries are missing, so it would be nice if Dale could spend three minutes filling them in, don’t you think ?
Well, I don’t see how this can relate to a Block definition.
If there WAS a summary, one might not have to guess.
By the way, I’m looking for the property that will tell me if an InstanceDefinition has InstanceObjects in the model.
Do you know which property will tell me this, without having to reference and count the InstanceObjects ?
Well, there’s so little sample code in the Rhinocommon documentation, so whenever I find some, I tend to check it out.
Funny that the property isn’t even present in the Python version
In this case, I need a property, not a Method.
And that’s why I need to understand what all the properties relate to !!!
These are probaly autogenerated from the source code:
/// <summary>
/// This does fancy stuff...
/// </summary>
public int SomeProperty { get; set;}
Sometimes, during a bugfix etc, a non-public member becomes public to be called from “outside”. If you miss to document this you probaly end up like this.
An api like Rhinocommon has thousands of public member, so its likely something is not commented. So what? Furthermore, properties like IsActive can be commented, but what should the comment tell you? And even if commented, its questionable if you really understand its meaning without seeing the source code…
If you really need to find out what it does, just use ILSpy. But even with this, since RC is a wrapper, you probally don’t see the underlying native logic.
Why is this arrogant? It think you misunderstood this statement…
Without a context you cannot always tell when something has a specific value. Usually you have to see the source code. As a enduser you have no access to the (original) source code.
Its super impractical to write 10 lines of comments just to explain when a value changes in detail. Chances are even high, that any small change of the code makes the comments obsolete. Its just not working.
As a developer, they have no obligation to document or facilitate its use. I think it would be in their interest to get better at this because in the end every developer is contributing to their software, but I don’t get the impression that this is the case. The SDK talks to you and tells you that you shouldn’t use those methods if you don’t know what they do for yourself. And so it is, you can ask once, twice, three times, until you get tired or you adapt… Rhinocommon is submerged in this dark water in which you only see if you belong to it or adapt to it. In the small area of clear water for all the fish, there is not much to eat.
EDIT: Rereading this, it seems to me that it falls very much on the unfair side. They have done a lot of work for third party developers, a lot, but I guess their software is much bigger than their documentation is.
Usually C#/C++ developers tend to use the ‘public’ access modifier way to often.
My experience is that there is huge difference between a small and large api.
I do work on a project with more then 100 classes. I find it extremly hard to maintain documentation on such a large scale. Usually I apply comments to anything public, and to important non-public members. But come on, its likely you miss something or that the comment is nonesense. Rhino is even bigger.
Just because its “public”, doesn’t necessary mean its a property a enduser like you should use. So the mistake is not a missing comment, but having the wrong access modifier, since its likely of internal usage. The context is unknown to you because you don’t see the source code. So I would expect if this flag is true, something is likely to break. But I don’t know what may causes the state. A good documentation would tell when it becomes true, but this is just impractical from a developers perspective.
No, this is not a good example because it uses the InstanceDefinition.ObjectCount Property, which does not count the instances, but the objects in a definition !
Since you are probally new to programming… its just how it is! There is never a perfect situation, api or whatsoever. See, I wonder if you document your kind of work always perfectly, assuming anyone can use it for any case. Why don’t you just create a new thread, explaining the problem you have and why the default way of doing it does not work for you? All the complaining did just distract from problem you are trying to solve.
I am new to programming with object oriented languages.
I’m not the “it’s just how it is” type of guy, and you can save some time by keeping your “it’s just as it is” comments to yourself.