Activate Assembly Component

Activate Assembly Component

Anonymous
Not applicable
398 Views
5 Replies
Message 1 of 6

Activate Assembly Component

Anonymous
Not applicable
How do I activate a assembly component just like If I double clicked on it in the browser.
I know I don't need to do this to work on the part with code, but currently all I am
wanting to do is just activate it.

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program
0 Likes
399 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Nevermind. I found what I was doing wrong. Now I just need to figure out how to get a
reference to it 8^)
--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Kent Keller" wrote in message
news:DF1073B964237FB97F3D98E1BDBC3EBC@in.WebX.maYIadrTaRb...
> How do I activate a assembly component
0 Likes
Message 3 of 6

Anonymous
Not applicable
Does oDoc.ActivatedObject do anything for you?

Neil

"Kent Keller" wrote in message
news:FE3ABE9F19AE7727E6C20013883CD85F@in.WebX.maYIadrTaRb...
> Nevermind. I found what I was doing wrong. Now I just need to figure
out how to get a
> reference to it 8^)
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
> "Kent Keller" wrote in message
> news:DF1073B964237FB97F3D98E1BDBC3EBC@in.WebX.maYIadrTaRb...
> > How do I activate a assembly component
>
>
0 Likes
Message 4 of 6

Anonymous
Not applicable
The problem is I can easily get a reference to a PartDocument or AssemblyDocument, such as
what odoc.ActivatedObject would return, but how do I get the Occurrence from that.

This is what I figured I need to activate the assembly occurrence. Or is there a way to
activate it if I just have the PartDocument object? I tried activate but didn't have any
luck.

oDoc.ComponentDefinition.Occurrences.Item(1).Edit

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Neil Munro" wrote in message
news:1B4B80AA851F7E7BC9F2501D92476CB8@in.WebX.maYIadrTaRb...
> Does oDoc.ActivatedObject do anything for you?
>
> Neil
>
> "Kent Keller" wrote in message
> news:FE3ABE9F19AE7727E6C20013883CD85F@in.WebX.maYIadrTaRb...
> > Nevermind. I found what I was doing wrong. Now I just need to figure
> out how to get a
> > reference to it 8^)
> > --
> > Kent
> > Assistant Moderator
> > Autodesk Discussion Forum Moderator Program
> >
> >
> > "Kent Keller" wrote in message
> > news:DF1073B964237FB97F3D98E1BDBC3EBC@in.WebX.maYIadrTaRb...
> > > How do I activate a assembly component
> >
> >
>
>
0 Likes
Message 5 of 6

Anonymous
Not applicable
Yes, the Edit method activates the occurrence just as if you had
double-clicked it in the browser. How are you deciding which component to
edit (sorry if I'm asking the same question you are?)

Neil


"Kent Keller" wrote in message
news:7F893E256B59899B89CB13EE54836CAD@in.WebX.maYIadrTaRb...
> The problem is I can easily get a reference to a PartDocument or
AssemblyDocument, such as
> what odoc.ActivatedObject would return, but how do I get the Occurrence
from that.
>
> This is what I figured I need to activate the assembly occurrence. Or is
there a way to
> activate it if I just have the PartDocument object? I tried activate but
didn't have any
> luck.
>
> oDoc.ComponentDefinition.Occurrences.Item(1).Edit
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
> "Neil Munro" wrote in message
> news:1B4B80AA851F7E7BC9F2501D92476CB8@in.WebX.maYIadrTaRb...
> > Does oDoc.ActivatedObject do anything for you?
> >
> > Neil
> >
> > "Kent Keller" wrote in message
> > news:FE3ABE9F19AE7727E6C20013883CD85F@in.WebX.maYIadrTaRb...
> > > Nevermind. I found what I was doing wrong. Now I just need to
figure
> > out how to get a
> > > reference to it 8^)
> > > --
> > > Kent
> > > Assistant Moderator
> > > Autodesk Discussion Forum Moderator Program
> > >
> > >
> > > "Kent Keller" wrote in message
> > > news:DF1073B964237FB97F3D98E1BDBC3EBC@in.WebX.maYIadrTaRb...
> > > > How do I activate a assembly component
> > >
> > >
> >
> >
>
>
0 Likes
Message 6 of 6

Anonymous
Not applicable
Neil helped me with a method to be able to activate "A" occurrence (the first one in a
assembly) of the part, but not necessarily the one that was originally edited.

I hope this is just a oversight and that we will have more access to occurrences in a
application or document event in future releases.

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Neil Munro" wrote in message
news:C3F3051E04DE97408C955147F76311ED@in.WebX.maYIadrTaRb...
> Yes, the Edit method activates the occurrence just as if you had
> double-clicked it in the browser.
0 Likes