Reply

SE ST5 - SolidEdgeDocument to AssemblyDocument

Hello everyone,

 

[i]I'm using Visual Studio 2010, Framework 4.0, Solid Edge ST5.[/i]

 

I have a problem with the dirty property within an addin.

 

 

Following code:

 

I'm calling a function with the parameter: ByVal oDoc As [b]SolidEdgeDocument[/b]

 

And now, in order to get all the occurrences, I'm trying to "convert" oDoc into SolidEdgeAssembly.AssemblyDocument like this:

 

 

 

[code]

If oDoc IsNot Nothing Then

Select Case oDoc.Type

Case DocumentTypeConstants.igAssemblyDocument

 

'oDoc is not dirty here!

 

Dim oTraAsm As SolidEdgeAssembly.AssemblyDocument

oTraAsm = oDoc 'oTraAsm dirty! why?

 

[/code]

This is weird... Smiley Tongueinch:

 

I tried:

 

 

[code]

oTraAsm = CType(oDoc, SolidEdgeAssembly.AssemblyDocument) ' also dirty

[/code]

 

Same result. Hmm...

 

Any ideas why oTraAsm is getting dirty? How can I fix that?

Does anyone have experience with that problem?

 

Thank you in advance!

 

 

Greetings,

 

Michael

 

Posted by: Michael Thiel
Post date: 7/25/2013 8:21:52 AM

1 REPLY

SE ST5 - SolidEdgeDocument to AssemblyDocument

Michael,

 

I'm trying to reproduce what you're seeing but I'm not having much luck. Now I can imagine that Dirty would change depending on what you're doing but per what you've described, it shouldn't be. If you can put together a small demo addin that reproduces the behavior, I'll gladly look at it.

 

Posted by: Jason Newell
Post date: 7/28/2013 11:32:29 PM