Jump to content


- - - - -

Rename objects in a feature

Rename Object

  • Please log in to reply
2 replies to this topic

#1 Mr. Vahid Jafari

Mr. Vahid Jafari

    Newbie

  • Members
  • Pip
  • 8 posts
  • LocationAugsburg, Germany

Posted 08 March 2019 - 10:07 AM

Hey guys,

 

Is it possible to rename an object in feature programming (e.g. in a loop)?

 

Here, I have a bsplinecurve called "tmp" in the picture 01.png and I want to give it an appropriate name. I just used the function "setName()" to rename it, but it doesn't seem to work, despite getting no error. The curve still has the name "tmp" 02.png . So how can I get to rename the curve in my feature?

 

 

Thank you very much in advance

 

best,

Vahid


  • 0

#2 Ceyhan Erdem

Ceyhan Erdem

    Advanced Member

  • Moderators
  • 68 posts

Posted 08 March 2019 - 11:28 AM

Hi Vahid,

 

I am sorry but within a Feature it is not possible to rename an already created object.

In the Feature definition the objects are named during compile time only.

 

Maybe you would like to do workaround by creating an imagecurve with the name you would like to assign.

 

Cheers

Ceyhan


  • 0

#3 Mr. Paulo Macedo

Mr. Paulo Macedo__0002

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 08 March 2019 - 01:13 PM

Another option is to use an entitygroup to store your curve with the name you want. 
Then when accessing the entity group you can check for the name of the object with an if statement and get all the information from the curve.

 

Paulo


  • 0