This topic has been locked.
4 replies Latest Post - 2012-04-24T20:10:06Z by SystemAdmin
Pinned topic Data Type of "Reference Documents" property?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Is the "Reference Documents" property a Collection? I am trying to print out the reference document url(s) for an object through a Macro, but am not figuring that out.
Updated on 2012-04-24T20:10:06Z at 2012-04-24T20:10:06Z by SystemAdmin
Re: Data Type of "Reference Documents" property?2012-04-23T14:57:49Z in response to SystemAdminI'm currently trying to access by defining the following:
Dim myDEF as Definition
Dim myREFS as OfCollection
Dim myREF as string
myREFS = myDEF.GetPropertyAsCollection("Reference Documents")
myREF = myREFS.Item(1)
I get an error:
"Property must be minispec or OF Collection"
RobertoFdez 270004J1CV102 Posts
ArifH 2700020US430 PostsACCEPTED ANSWER
Re: Data Type of "Reference Documents" property?2012-04-24T15:29:10Z in response to RobertoFdezIt is String.
If you have more than one item and the output is not to your liking, you can find out where to split the string by using inStr.
InStr(1, SearchString, vbCrLf) will return the position of the first line break character.
Re: Data Type of "Reference Documents" property?2012-04-24T20:10:06Z in response to SystemAdminYou're right - it is a string, and instead of a collection of objects, I have to use the following:
address_string = myDEF.GetProperty("Reference Documents")
At least there is a line break inbetween links and it could be parsed out.
It would be better if SA could treat each hyperlink as a seperate Information (DM2) object (for the DoDAF folks) or other 'kinds' of information objects (e.g., SOP, Control, Support Doc, etc). If these were objects, we could use the ONEOF or LISTOF in the property definition.