Sunday, February 05, 2012
How to access first level of occurrences in assy?
Last Post 11 Jan 2010 01:53 PM by Juraj Joob. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Juraj JoobUser is Offline
New Member
New Member
Posts:26

--
11 Jan 2010 08:16 AM  

Helo,

A'm programmer under NX6 in C# and C++. I want to get only first level of occurrences In SolidEdge ST2 assembly. Property SolidEdge.AssemblyDocument.Occurrences gives all levels of occurrences of all assembly.

Asm1.asm
     |---  Part1.par:1                          - first level
     |---  Part1.par:2                          - first level
     |---  SubAsm1.asm:1               - first level
     |           | --- Part2.par:1              - second level
     |           | --- Part3.par:1              - second level
    .
    .
    .

Thanks.

Julian GuilloUser is Offline
Guru
Basic Member
Basic Member
Posts:125

--
11 Jan 2010 09:03 AM  
Juraj,
You are wrong. The collection Occurrences in an ASM file gives you only the first level of occurrences which is just what you want.
To get all the levels you should be calling a recursive subroutine.
Try this quick an dirty example in VB and see.
oSE=getobject(,"solidedge.application")
oAsm=oSE.ActiveDocument
for i=1 to oAsm.Occurrences.Count
debug.print oAsm.Occurrences(i).Name
next
Juraj JoobUser is Offline
New Member
New Member
Posts:26

--
11 Jan 2010 01:53 PM  
Julian,

yes I was wrong.

Thanks.
You are not authorized to post a reply.

Active Forums 4.2
Copyright © 2011 JasonNewell.NET