Skip to main content
Solved

I'm looking for a way to populate a list based on current list value without exploding it.


rva1
Contributor
Forum|alt.badge.img+1
  • Contributor

Hi ! I hope someone can help.

 

I'm trying to create more attributes within existing list without exploding and rebuilding it. Like this:

 

_list{0}.aaa : A_123

_list{1}.aaa : A_234

_list{2}.aaa : B_245

 

to

 

_list{0}.aaa : A

_list{0}.bbb :123

_list{1}.aaa : A

_list{1}.bbb: 234

_list{2}.aaa : B

_list{2}.bbb: 245

 

Is there a way?

 

I'm specially looking for help on the list creating part. I can manage renaming the list values;)

 

I was looking for a way to first do this:

_list{0}.aaa : A_123

_list{0}.bbb : A_123

 

and than do this:

_list{0}.aaa : A

_list{0}.bbb : 123

 

cheers,

ronald

 

Best answer by stalknecht

My best guess is to use a pythonCaller. I have attached a small example.

View original
Did this help you find an answer to your question?

5 replies

stalknecht
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • October 14, 2020

My best guess is to use a pythonCaller. I have attached a small example.


rva1
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • October 15, 2020
stalknecht wrote:

My best guess is to use a pythonCaller. I have attached a small example.

marvelous wilko!

tnx

ronald


rva1
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • October 15, 2020
stalknecht wrote:

My best guess is to use a pythonCaller. I have attached a small example.

strange... i can access the original list in transformers, but not the lists created by the python script.

 

_list{0}.IfcContent (encoded: UTF-8) < created with python script

_list{0}.IfcLine (encoded: UTF-8) < created with python script

_list{0}.text_line_data (encoded: windows-1252) < original list

 

Could it be encoding?

 


stalknecht
Contributor
Forum|alt.badge.img+19
  • Contributor
  • October 15, 2020
rva1 wrote:

strange... i can access the original list in transformers, but not the lists created by the python script.

 

_list{0}.IfcContent (encoded: UTF-8) < created with python script

_list{0}.IfcLine (encoded: UTF-8) < created with python script

_list{0}.text_line_data (encoded: windows-1252) < original list

 

Could it be encoding?

 

No I've forgot to expose the list in the PythonCaller in the example. See screenshotCapture


rva1
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • October 15, 2020
rva1 wrote:

strange... i can access the original list in transformers, but not the lists created by the python script.

 

_list{0}.IfcContent (encoded: UTF-8) < created with python script

_list{0}.IfcLine (encoded: UTF-8) < created with python script

_list{0}.text_line_data (encoded: windows-1252) < original list

 

Could it be encoding?

 

thank you!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings