Hi Guys,
I'm new at this, and I'm having trouble finding the proper way to phrase this in Ruby. And I don't know if the Ruby API in SketchUp is different. But, thats what I'm trying to use it for.
def self.initialize_job_info
return{
'salesperson' => ' = $pg_settings['salespersons'[['salesperson']['id']]] if ('on' = $pg_settings['salespersons'[['salesperson']['defsales']]])'
This is what I'm basically trying to do:
This part of the code works as it should
def self.initialize_job_info
return{
'salesperson' => ''
It sets an empty form's initial value of job_info['salesperson']'s value to ' ' if no pre-existing value is found.
So, there is a value I want to place in the Hash that is being passed from $pg_settings.
The value I want is, and I hope this make sense, the value of this specific 'id'
$pg_settings['salespersons'] {//which is a list of 'salesperson'
<salesperson> id="561" name="name" phone="phone number" defsales="on" email="email" </salesperson>
if (defsales == "on") then 'salesperson' => 'value="id"'
Does this make sense?
I'm pulling my hair out, so any help you can give on this would be great.