Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Releasing a word report in RS Engineer

Has anyone else had issues releasing a word report, and what was your solution/workaround? I have a word report that is populated at run time and functions correctly in Rulestream engineer, however when I release the models the word doucment that was supposed to be released doesn't show up in the release folder. Does one need custom code specified ouside of rulestream to be able to control the release path, and if so does anyone know where to find documentation about using custom vb code with Rulestream?  Theres another word doc that does release correctly so I know it can be done, but it was set up before I joined the project so it's release mechanisms and code are still a mystery to me.

5 REPLIES

Re: Releasing a word report in RS Engineer

no special code required. Probably you need to check your rs Word specification.
Highlighted

Re: Releasing a word report in RS Engineer

The newer non-3D integrations (Charting, DWG, JT, and Word dont automatically release during line item release yet.

 

Use the following to cause the output to be created in WIP.

 

g_RsEngineer.CreateOutput(PF.ObjId, Spec.SpecID, "", False)

 

Then, you'll have to copy the file from WIP to the appropriate release folder. I use the following function to get the Spec ID. For Word, the WantedSpecType is "WORD", upper-case.

 

Private Function FindSpecByType(ByRef ThePart As Part, ByRef WantedSpecType As String) As Spec

' Locates the spec of a given type on the given part family

FindSpecByType = Nothing

For Each spec As Spec In ThePart.Specs

Dim strSpecType As String = spec.SystemID.ToString()

If (strSpecType = WantedSpecType) Then

FindSpecByType = spec

Exit For

End If

Next spec

End Function

Re: Releasing a word report in RS Engineer

I was looking through our release code, and I did I found commented code that points out that there is a bug

(IR 7275082) that prevents Word documents from being released. So I will definintely experiment with the code you gave me, it might be a good work around for other types of files as well. Thank you @Rick_S

Re: Releasing a word report in RS Engineer

Yes, in addition to "WORD" this will also work for (note these are case sensitive when making the call to CreateOutput()):

 

"JT"

 

"DWG"

 

"Chart"

Solution
Solution
Accepted by topic author Eric_Isaacson3
3 weeks ago

Re: Releasing a word report in RS Engineer

We were calling the following line from the g_rsEngineer_RsUserRelease in Custom.vb

g_RsEngineer.CreateOutput(PF.ObjId, Spec.SpecID, "", False)

 

We had it in a function that would only do it for a Word spec. We determined the reason it wasn't working was that there was logic looking to see if the RELEASE attribute was True in order to run. It looks like that attribute is disabled for the Word Spec. However, when we originall did this we must have been able to set the value, since it does work for one old Word Spec, but no new ones.

 

We removed the check for the RELEASE attribute and now it works fine.

Thanks for the help.