Inserting a part into an assembly

Inserting a part into an assembly

Anonymous
Not applicable
562 Views
9 Replies
Message 1 of 10

Inserting a part into an assembly

Anonymous
Not applicable
Hi all could anyone point me in the right direction in regards to inserting
a part into an assembly as far as i can gather it is the Add Component
Occurrence Example in the API help is this correct or not.

Thanks Wayne
0 Likes
563 Views
9 Replies
Replies (9)
Message 2 of 10

Anonymous
Not applicable
Wayne,

That's the right method. Take a look at the sample titled "Add Component
Occurrence" in the online help. It demonstrates this method.

-Brian

"Wayne" wrote in message
news:AC245102E99AD48F43FCCAC2E75F01EE@in.WebX.maYIadrTaRb...
> Hi all could anyone point me in the right direction in regards to
inserting
> a part into an assembly as far as i can gather it is the Add Component
> Occurrence Example in the API help is this correct or not.
>
> Thanks Wayne
>
>
0 Likes
Message 3 of 10

Anonymous
Not applicable
Thanks I thought so but i keep getting activeX cannot create component
errors do you have any ideas

"Brian Ekins" wrote in message
news:C687929EB83FF829920516689F374DC0@in.WebX.maYIadrTaRb...
> Wayne,
>
> That's the right method. Take a look at the sample titled "Add Component
> Occurrence" in the online help. It demonstrates this method.
>
> -Brian
>
> "Wayne" wrote in message
> news:AC245102E99AD48F43FCCAC2E75F01EE@in.WebX.maYIadrTaRb...
> > Hi all could anyone point me in the right direction in regards to
> inserting
> > a part into an assembly as far as i can gather it is the Add Component
> > Occurrence Example in the API help is this correct or not.
> >
> > Thanks Wayne
> >
> >
>
>
0 Likes
Message 4 of 10

Anonymous
Not applicable
If i copy and paste the code from the example Add Component
Occurrence into VB why do i get an error message what am i doing wrong it
says ActiveX cannot create
component.

Could someone point me in the right direction
Thanks Wayne
0 Likes
Message 5 of 10

Anonymous
Not applicable
Is the filename that's specified in the Add method correct? That's my only
guess at this point without having more information. There's another sample
you can try too. Run the AutoBolts samples that's delivered with Inventor.
There's small problem with that sample. Before you run it delete the file
in the "Bolt Library" directory.

-Brian

"Wayne" wrote in message
news:991FD35D63E6E232596EC1D8EB517361@in.WebX.maYIadrTaRb...
> If i copy and paste the code from the example Add Component
> Occurrence into VB why do i get an error message what am i doing wrong it
> says ActiveX cannot create
> component.
>
> Could someone point me in the right direction
> Thanks Wayne
>
>
0 Likes
Message 6 of 10

Anonymous
Not applicable
AutoBolts didnt do the trick for me either but maybe you can tell me the
example from the API help file that uses the MSCal control is there info
missing from that doucment as it doesnt say how to actually add the control
to the prowser pane it seems to miss out a section of important info. ??

Wayne

"Brian Ekins" wrote in message
news:D544F92783A1C2019A3BE139907C8B2B@in.WebX.maYIadrTaRb...
> Is the filename that's specified in the Add method correct? That's my
only
> guess at this point without having more information. There's another
sample
> you can try too. Run the AutoBolts samples that's delivered with
Inventor.
> There's small problem with that sample. Before you run it delete the file
> in the "Bolt Library" directory.
>
> -Brian
>
> "Wayne" wrote in message
> news:991FD35D63E6E232596EC1D8EB517361@in.WebX.maYIadrTaRb...
> > If i copy and paste the code from the example Add Component
> > Occurrence into VB why do i get an error message what am i doing wrong
it
> > says ActiveX cannot create
> > component.
> >
> > Could someone point me in the right direction
> > Thanks Wayne
> >
> >
>
>
0 Likes
Message 7 of 10

Anonymous
Not applicable
Wayne

I have tried that one before, and it worked fine for me. Not sure what could be going
wrong for you though?

--
Kent


"Wayne" wrote in message
news:D2E88C926A9FE935D91A974DADBF4DC8@in.WebX.maYIadrTaRb...
> AutoBolts didnt do the trick for me either but maybe you can tell me the
> example from the API help file that uses the MSCal control is there info
> missing from that doucment as it doesnt say how to actually add the control
> to the prowser pane it seems to miss out a section of important info. ??
>
> Wayne
0 Likes
Message 8 of 10

Anonymous
Not applicable
It works from within IV ide but not from within a browser pane i have
programmed in visual basic
any ideas
Wayne
"Kent Keller" wrote in message
news:C090B45AE4CCA440201CAEC312CDAB47@in.WebX.maYIadrTaRb...
> Wayne
>
> I have tried that one before, and it worked fine for me. Not sure what
could be going
> wrong for you though?
>
> --
> Kent
>
>
> "Wayne" wrote in message
> news:D2E88C926A9FE935D91A974DADBF4DC8@in.WebX.maYIadrTaRb...
> > AutoBolts didnt do the trick for me either but maybe you can tell me the
> > example from the API help file that uses the MSCal control is there info
> > missing from that doucment as it doesnt say how to actually add the
control
> > to the prowser pane it seems to miss out a section of important info. ??
> >
> > Wayne
>
>
>
0 Likes
Message 9 of 10

Anonymous
Not applicable
The first set of code in the online documentation is incomplete. There was
a cut and paste problem. Here's the complete set of code for the Form_Load
function.

' Declare variable for the calendar control.
Private WithEvents oCal As MSACAL.Calendar

' Declare global variables for the Inventor document and Application.
Private WithEvents oDocEvents As DocumentEvents
Private oPane As BrowserPane
Private oApp As Inventor.Application

Private Sub Form_Load()
' Set a reference to a running instance of Inventor.
' This expects Inventor to be running.
Set oApp = GetObject(, "Inventor.Application")

' Get the active document. This assumes a document is open.
Dim oDoc As Inventor.Document
Set oDoc = oApp.ActiveDocument

' Connect to the documents events. Used to
' listen for when the document is closed.
Set oDocEvents = oDoc.DocumentEvents

' Create a new browser pane using the Microsoft calendar control.
Set oPane = oDoc.BrowserPanes.Add("Calendar", "MSCAL.Calendar")

' Set a reference to the calendar control
' that was created on the pane.
Set oCal = oPane.Control

' Set the calendar to todays date.
oCal.Today

' Make the new pane the active pane.
oPane.Activate
End Sub

-Brian

"Wayne" wrote in message
news:9197A3E6E0888B7B74BCD6C4351E3EBF@in.WebX.maYIadrTaRb...
> It works from within IV ide but not from within a browser pane i have
> programmed in visual basic
> any ideas
> Wayne
> "Kent Keller" wrote in message
> news:C090B45AE4CCA440201CAEC312CDAB47@in.WebX.maYIadrTaRb...
> > Wayne
> >
> > I have tried that one before, and it worked fine for me. Not sure what
> could be going
> > wrong for you though?
> >
> > --
> > Kent
> >
> >
> > "Wayne" wrote in message
> > news:D2E88C926A9FE935D91A974DADBF4DC8@in.WebX.maYIadrTaRb...
> > > AutoBolts didnt do the trick for me either but maybe you can tell me
the
> > > example from the API help file that uses the MSCal control is there
info
> > > missing from that doucment as it doesnt say how to actually add the
> control
> > > to the prowser pane it seems to miss out a section of important info.
??
> > >
> > > Wayne
> >
> >
> >
>
>
0 Likes
Message 10 of 10

Anonymous
Not applicable
Thanks Brian that was a great help i have managed to get that to work

Wayne
"Brian Ekins" wrote in message
news:72FE06BC8CB5CDC2D67C4796560A29C7@in.WebX.maYIadrTaRb...
> The first set of code in the online documentation is incomplete. There
was
> a cut and paste problem. Here's the complete set of code for the
Form_Load
> function.
>
> ' Declare variable for the calendar control.
> Private WithEvents oCal As MSACAL.Calendar
>
> ' Declare global variables for the Inventor document and Application.
> Private WithEvents oDocEvents As DocumentEvents
> Private oPane As BrowserPane
> Private oApp As Inventor.Application
>
> Private Sub Form_Load()
> ' Set a reference to a running instance of Inventor.
> ' This expects Inventor to be running.
> Set oApp = GetObject(, "Inventor.Application")
>
> ' Get the active document. This assumes a document is open.
> Dim oDoc As Inventor.Document
> Set oDoc = oApp.ActiveDocument
>
> ' Connect to the documents events. Used to
> ' listen for when the document is closed.
> Set oDocEvents = oDoc.DocumentEvents
>
> ' Create a new browser pane using the Microsoft calendar control.
> Set oPane = oDoc.BrowserPanes.Add("Calendar", "MSCAL.Calendar")
>
> ' Set a reference to the calendar control
> ' that was created on the pane.
> Set oCal = oPane.Control
>
> ' Set the calendar to todays date.
> oCal.Today
>
> ' Make the new pane the active pane.
> oPane.Activate
> End Sub
>
> -Brian
>
> "Wayne" wrote in message
> news:9197A3E6E0888B7B74BCD6C4351E3EBF@in.WebX.maYIadrTaRb...
> > It works from within IV ide but not from within a browser pane i have
> > programmed in visual basic
> > any ideas
> > Wayne
> > "Kent Keller" wrote in message
> > news:C090B45AE4CCA440201CAEC312CDAB47@in.WebX.maYIadrTaRb...
> > > Wayne
> > >
> > > I have tried that one before, and it worked fine for me. Not sure
what
> > could be going
> > > wrong for you though?
> > >
> > > --
> > > Kent
> > >
> > >
> > > "Wayne" wrote in message
> > > news:D2E88C926A9FE935D91A974DADBF4DC8@in.WebX.maYIadrTaRb...
> > > > AutoBolts didnt do the trick for me either but maybe you can tell me
> the
> > > > example from the API help file that uses the MSCal control is there
> info
> > > > missing from that doucment as it doesnt say how to actually add the
> > control
> > > > to the prowser pane it seems to miss out a section of important
info.
> ??
> > > >
> > > > Wayne
> > >
> > >
> > >
> >
> >
>
>
0 Likes