I am trying to copy pins from a layout view to another view using dbCopyFig function.
In the source view the pin property dialog Box displays "Rectangle Pin Properties". When it is copied to another layout view the same appears as "Rectangle Properties". However if the copying is done as normal the the properties remain the same. I would like to understand why the object type is lost during copying by the above command.
That's because dbCopyFig is a low level function that copies just the figure - it doesn't copy the objects to which the figure is attached (e.g. the net, the terminal, the pin). You'd have to recreate those, using (say) dbMakeNet, (optionally dbCreateTerm) and dbCreatePin - and you can pass the copied figure as the figId to this function: