I am not having any errors, but the function is not executed as i expect. I am expecting that the component would be add at the specified location but this doesn't happen. What happens is that the "create symbol" dialog box is opened & the correct component is selected, but it is not added!
I want this piece of code to work because using for loops i can add many instances in different locations without opening the dialog box. i.e. to automate it.