copy & paste syntax error vb

copy & paste syntax error vb

andrew_canfield
Collaborator Collaborator
820 Views
3 Replies
Message 1 of 4

copy & paste syntax error vb

andrew_canfield
Collaborator
Collaborator

Hello

Still figuring this out - copied code & pasted it into a new form (Visual Studio 2019 .Net 4.5 Inventor 2018)

& 5 errors appear - fixing errors isn't easy. Any  hints/tips appreciated 

ref:

https://modthemachine.typepad.com/my_weblog/2013/03/inventor-api-training-lesson-12.html

 

apprentice.JPGsyntax.png

 

Regards

 

Andrew

0 Likes
Accepted solutions (1)
821 Views
3 Replies
Replies (3)
Message 2 of 4

HideoYamada
Advisor
Advisor

Hi,

 

For example, you should modify the following code

oApprenticeDoc = mApprenticeServer.Open

               ("c:\temp\block.ipt")

to

oApprenticeDoc = mApprenticeServer.Open _
               ("c:\temp\block.ipt")

 

 

Or, simply write like this :

 

oApprenticeDoc = mApprenticeServer.Open("c:\temp\block.ipt")

 

=====

Freeradical

 Hideo Yamada

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes
Message 3 of 4

andrew_canfield
Collaborator
Collaborator

Thanks, down to 1 error now...

1 error.png

0 Likes
Message 4 of 4

HideoYamada
Advisor
Advisor
Accepted solution

Hi,

 

Change the following line.

'Dim mApprenticeServer As ApprenticeServerDocument
Dim mApprenticeServer As New ApprenticeServerComponent

 

=====

Freeradical

 Hideo Yamada

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes