Grasshopper

generative modeling for Rhino

Michel Cassagnes
  • Male
  • Boulogne-Billancourt CEDEX
  • France
Share on Facebook
Share Twitter

Michel Cassagnes's Friends

  • Guillaume Niel
  • Mahdi Soheyli Fard
  • Jon Mirtschin

Michel Cassagnes's Groups

Michel Cassagnes's Discussions

Access to the attributes of an object
19 Replies

Hello everybody,Despite a huge effort reading the forum and the documentation I can't write the function to access to the layer name of an object or other attributes.Extract of my code :Private Sub…Continue

Tags: attributes, ObjectID, Layer

Started this discussion. Last reply by Mostapha Sadeghipour May 2.

 

Welcome, Michel Cassagnes!

Latest Activity

Mostapha Sadeghipour replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Florian, thank you for the quick reply. :) I agree that Steve can help. I think I'll also take a look to GHPython source code when I get a chance. I'll post it here if I find the solution. Best, Mostapha"
May 2
Florian Frank replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Mostapha, glad you came back ;-) As i said, you have to connect an ID containter to whatever geometry first, and then connect it to the python component as String. Python works a little different than the native .net languages, cause it's an…"
May 2
Mostapha Sadeghipour replied to Michel Cassagnes's discussion Access to the attributes of an object
"Thanks Florian! For some reason I totally forgot about this discussion! Thank you Michel to make it live again. So apparently I couldn't clearly explain my problem. What I'm looking for is not to use the ID component and find the…"
May 2
Michel Cassagnes replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Florian, Thank you for your help. I didn't known the ID component before your post ! So I looked for a lot to find how to retrieve the objects Id. Regards, Michel"
May 2
Michel Cassagnes replied to Michel Cassagnes's discussion Access to the attributes of an object
"Thank you David. After studying your message and others I think I can go on. What I try to do : from multiple meshes I would like to have a unique list of points and different groups of meshes, with vertices related to this list of points. The…"
May 2
Florian Frank replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Mostapha, You cast the Mesh on the input to a string type...this will cause the value "Rhino.Geometry.Mesh" and not the desired guid. put the ID (which you show on the panel) to the string input of the python script ;-)"
Apr 25
Mostapha Sadeghipour replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Florian, Thanks again. This is what happens when I try it. I tired couple of different ways to pass x to Parse but it never worked. "
Apr 24
Florian Frank replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Mostapha, Ok i didn't know that you're searching for python. I thought you had some other situation, where you couldn't get the GUID from a geometry. Well in this case you can just use this: import System.Guid as Guid import…"
Apr 24
Mostapha Sadeghipour replied to Michel Cassagnes's discussion Access to the attributes of an object
"Thanks Vicente. I assume this trick works only for C# and VB components but there is no GUID option for GHPython. I assume this is because GHPython is set up to work by GUID as default, however when I use the GHPython GUID to find the layer it…"
Apr 24
Vicente Soler replied to Michel Cassagnes's discussion Access to the attributes of an object
"hmm... someone answered almost the same thing above. Not sure what is the problem then."
Apr 24
Vicente Soler replied to Michel Cassagnes's discussion Access to the attributes of an object
"It's actually really easy, just set the type hint of a scripting component input as GUID and connect the parameter with referenced geometry to it."
Apr 24
Florian Frank replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi David, I'm often casting the IGH_ActiveObject owner... to type GH_Component, so i have access to all inputs and outputs (linked Components). But isn't there a way to get to the IGH_DataAcess object of that component. If so, it would be…"
Apr 24
Mostapha Sadeghipour replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Florian, Thank you for the reply. To find the ID of the objects in script component is what I was looking for. At least now, that you say that there is no way to do that in script components, I don't feel bad that I couldn't figure it…"
Apr 24
David Rutten replied to Michel Cassagnes's discussion Access to the attributes of an object
"If the mesh data in Grasshopper is still referenced (tooltip of the data should tell you), then you can convert the mesh to a GUID and import the GUID into the script. It's a bit awkward, but there's no other way to do it using the script…"
Apr 24
Florian Frank replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Mostapha, this is an interesting topic. In script components it seems, that you can't cast objects to their GH_ geometric container, so there is no reference id. In a custom GH_Component it's fairly easy though: protected override void…"
Apr 24
Mostapha Sadeghipour replied to Michel Cassagnes's discussion Access to the attributes of an object
"Hi Florian, Do you also know how is it possible to script finding the ID of a referenced object? Thanks, -Mostapha"
Apr 24

Profile Information

Company, School, or Organization
terrell

Comment Wall

You need to be a member of Grasshopper to add comments!

Join Grasshopper

  • No comments yet!
 
 
 

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service