Results 1 to 9 of 9

Thread: How to obtain Root's properties

  1. #1
    Join Date
    Feb 2012
    Posts
    6

    Default Answered: How to obtain Root's properties

    Hi,

    I'm trying to obtain root's properties in Composer 2011x with help of C#.
    Lets imagine following structrure :
    Product1 (root)
    - Part1
    - Product2
    - Part2
    - Part3

    Document.GetAssyRoot - returns direct children of the root, in my case : Part1 and Product2

    Then I use the Document.GetAssyParents for e.g.Product2 and get the following result :
    if Document.UseGUID is set to true :
    <CLitSelection Name="" Ident="-1">-1#</CLitSelection>
    if Document.UseGUID is set to false :
    <CLitSelection Name="" Ident="-1"><CLitModifiable Name="Product1"/></CLitSelection>

    But if I use any of these inputs for document.GetProperties I got nothing.

    I'm able to obtain properties for Part1, Product2, ... , but not for root.

    Any help would be greatly appreciated.

    Miro

  2. "I am using v6r2013.

    I received that string by calling GetAssyParents on one of the actors that was at the top. It may be that you will receive a different value based on your model."


  3. #2
    Join Date
    Feb 2012
    Posts
    6

    Default just a comment

    Part2 and Part3 (in structure example) are children of Product2, it looks like my tabs were ignored and I didn't dotice it right away.

    Miro

  4. #3
    Join Date
    Apr 2009
    Location
    Stutzheim, France
    Posts
    16
    Provided Answers: 2

    Default

    Miro,
    in Composer, you can select in "actor mode" (orange) or in "assembly mode (blue).
    If you select the Root assembly in normal mode, you select all the actors of the assembly.
    If you select the Root assy in assembly mode, you'll be able to get Root properties.
    Maybe there is something to change with the API before selecting Root assy.
    ...
    I've just found this :
    [TABLE]
    [TR]
    [TD][B]AssySelectionMode[/B] as Boolean[/TD]
    [TD]Enables assembly selection mode.[/TD]
    [TD]1: True
    0: False[/TD]
    [/TR]
    [/TABLE]

  5. #4
    Join Date
    Feb 2012
    Posts
    6

    Default

    Hi,

    sorry for my late reply, I was busy with another project.

    All my tests were done with [B]AssySelectionMode [/B]consideration, meaning I set it to false and did all my tests and I did the same with true setting.

    I found out that if I wanna create an assembly node under the root, I have to use "-1" as method param, e.g. : doc.CreateAssyGroup("-1"), unfortunatelly
    the same approach was not working for GetProperties method.

  6. #5
    Join Date
    Apr 2008
    Location
    Winston-Salem, NC
    Posts
    78
    Provided Answers: 5

    Default

    Did u figure this out? I am also trying to find and alter the properties of the root node.

  7. #6
    Join Date
    Feb 2012
    Posts
    6

    Default

    No I didn't, I already contacted DS for this issue, but didn't get a clear answer.

  8. #7
    Join Date
    Jul 2009
    Location
    Waltham, MA
    Posts
    67
    Provided Answers: 26

    Default

    Miro, I responded to Sylvylou after his post on the 15th. Does this do the job below?

    Sylvylou, Have a go with:

    <CLitSelection Name="" Ident="-1">-1#</CLitSelection>

    I received this by first calling GetAssyRoot to locate the top level components, then a call to GetAssyParents gave me the selection string above. Once this was done, I successfully received the properties for the Root actor when I called GetActorsProperties

  9. #8
    Join Date
    Feb 2012
    Posts
    6

    Default

    Hi,

    what version of 3DVia composer are you using ?
    I have 2012x and selection : <CLitSelection Name="" Ident="-1">-1#</CLitSelection> is not allowed, meaning when you use it as input you get empty string as result.
    2012x do not have a GetActorsProperties method only GetProperties (in Document class) and when you use the selection above as input you get as result empty string.

  10. #9
    Join Date
    Jul 2009
    Location
    Waltham, MA
    Posts
    67
    Provided Answers: 26

    Default

    I am using v6r2013.

    I received that string by calling GetAssyParents on one of the actors that was at the top. It may be that you will receive a different value based on your model.

Similar Threads

  1. Insert Automatically all user properties on label
    By lalfonso in forum Member Support
    Replies: 3
    Last Post: 2012-03-09, 10:23 AM
  2. Changing Properties not working!
    By sylvylou in forum Questions, Problems, and Troubleshooting
    Replies: 1
    Last Post: 2011-10-28, 01:18 PM
  3. How to apply properties to an arrow
    By sylvylou in forum Questions, Problems, and Troubleshooting
    Replies: 0
    Last Post: 2011-07-14, 03:25 PM
  4. App for predefining properties prior to creating new actors
    By sylvylou in forum Questions, Problems, and Troubleshooting
    Replies: 3
    Last Post: 2011-03-19, 03:51 PM
  5. Animation Complete, change properties
    By Phil_Porter in forum Member Support
    Replies: 2
    Last Post: 2009-11-17, 04:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •