iProperties.Value in IDW

iProperties.Value in IDW

Anonymous
Not applicable
381 Views
1 Reply
Message 1 of 2

iProperties.Value in IDW

Anonymous
Not applicable

Hi,

 

I try to change the iProperties value PROJECT automatically in an IDW - file. I use this script, but somehow it doesn't work.

 

I think i don't use the right  iProperties.Value("Project", "Project") 

 

Who can help me.

 

In the IPT-file this script works fine.

 

 

A=ThisDoc.Path
A=Right(A,6)


iProperties.Value("Project", "Project")=A
0 Likes
382 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

This how you Iproperties are accessed in drawing document and it can be changed.
This may provide you a overview on iproperties.
Sub test()
' Get the active Drawing document
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument

' Get the PropertySets collection from the drawing
Dim oPropSets As PropertySets
Set oPropSets = oDoc.PropertySets

' Get the user Defined property set
Dim oPropSet As PropertySet
Set oPropSet = oPropSets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
Debug.Print oPropSet.DisplayName

' List all the properties in this set, and change the value to "Changed"
Dim oProp As Property
For Each oProp In oPropSet
Debug.Print oProp.Name, oProp.Value
oProp.Value = "Changed"
Debug.Print oProp.Name, oProp.Value
Next
End Sub

 

-Varadan

0 Likes