comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Copying an object
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Copying an object [message #17001 is a reply to message #16997] Wed, 01 September 1999 00:00 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
> Hi. How may one create an exact copy of an object?
>
> In particular, I have an IDLgrModel containing other Models each with a
> polygon object inside, and each little model is subjected to a number of
> scale/translation/rotations. I want to create another Model identical to
> this in all respects. Is there a direct way to do this?

The best way I have found is to SAVE it then RESTORE it. My routine
MGH_OBJ_CLONE provides a convenient way to do this.

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/mgh_ob j_clone.pro

It sounds kludgy but it works surprisingly well. I have used it widely &
successfully in my OG code for a year now. Just make sure the IDLgrModel in
question is not a child of any other IDLgrModel or IDLgrView at the time you
clone it.

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: objarr
Next Topic: Re: simple question about bytes

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 03:40:06 PDT 2025

Total time taken to generate the page: 1.27975 seconds