On the docs it tells you this command "*uses output arguments*" and "*returns
an ISIVTCollection which you can use to get the output arguments*".

What this means is you can do:

var dr_obj = ExtractFromComponents("ExtractPolygonsOp", "", detachName,
true, siImmediateOperation, siKeepGenOpInputs, null)("OutputObjs")(0)

The (0) bit is because ("OutputObjs") returns a collection, but if you're
only doing this for 1 mesh, it'll be just 1 object, thus (0) gets the first
and only item in it.



On Wed, Dec 11, 2013 at 12:49 PM, Ponthieux, Joseph G. (LARC-E1A)[LITES] <
[email protected]> wrote:

>
>
> So I can name the file on output through the command via detachName, but I
> can’t be sure if the name won’t be incremented if it uses a name that
> matches an object that already exists for whatever reason.
>
>
>
> Is there a way to capture the resulting name?  I’ve been unable to do this
> through
>
>
>
> ExtractFromComponents("ExtractPolygonsOp", "", detachName, true,
> siImmediateOperation, siKeepGenOpInputs, dr_obj)
>
>
>
> Or
>
>
>
> var dr_obj = ExtractFromComponents("ExtractPolygonsOp", "", detachName,
> true, siImmediateOperation, siKeepGenOpInputs, null)
>
>
>
>
>
> --
>
> Joey Ponthieux
>
> LaRC Information Technology Enhanced Services (LITES)
>
> Mymic Technical Services
>
> NASA Langley Research Center
>
> __________________________________________________
>
> Opinions stated here-in are strictly those of the author and do not
>
> represent the opinions of NASA or any other party.
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Alan Fregtman
> *Sent:* Wednesday, December 11, 2013 11:56 AM
> *To:* XSI Mailing List
> *Subject:* Re: can you generate an object anywhere you want?
>
>
>
> The active Scene_Root is the default and only location for new objects
> created in this manner (and most other manners.)
>
>
>
> Also, separating with periods to define the hierarchy is not an actual
> convention. That said, it's trivial to use the .AddChild() method of any
> object to put one or more objects under it as children, after they are made.
>
>
>
>
>
> On Wed, Dec 11, 2013 at 11:27 AM, Ponthieux, Joseph G. (LARC-E1A)[LITES] <
> [email protected]> wrote:
>
> Howdy folks,
>
>
>
> I’m trying to repair an old jscript.
>
>
>
> The primary command being used is
>
>
>
> ExtractFromComponents("ExtractPolygonsOp", "", detachName, true,
> siImmediateOperation, siKeepGenOpInputs, null)
>
> I’m attempting to use a custom name for the resulting object in
> “detachName” which looks like this
>
>
>
> Model.transfogroup.polymsh_separate
>
>
>
> The intent is to have the new object, as a result of the extraction,
> created under
>
>
>
> Scene_Root
>
>                 Model
>
>                                 transfogroup
>
>                                                 polymsh_separate
>
>
>
> Only problem is it creates the extraction under root instead of Model as
>
>
>
> Scene_Root
>
> Model_transfogroup_polymsh_separate
>
>
>
> I suppose I could move the new object from Root to  Model.transfogroup
> after the fact but I’m curious if anyone knows if it’s possible to direct
> object creation in this manner and how it would be done. Or is root the
> default, and only, location for new objects created this way?
>
>
>
>
>
> --
>
> Joey Ponthieux
>
> LaRC Information Technology Enhanced Services (LITES)
>
> Mymic Technical Services
>
> NASA Langley Research Center
>
> __________________________________________________
>
> Opinions stated here-in are strictly those of the author and do not
>
> represent the opinions of NASA or any other party.
>
>
>
>
>

Reply via email to