Creating custom iProperties

Creating custom iProperties

Anonymous
Not applicable
477 Views
2 Replies
Message 1 of 3

Creating custom iProperties

Anonymous
Not applicable
We have created new drawing templates where the titleblock refers to custom iProperties for the values. When we go into old drawings, we can copy/poste the titleblock in but we need to create the custom iProperties every time and this gets tedious. I need a simple macro to create custom fields for "Dwg Line 1", "Dwg Line 2", "EN#" etc. The values can be empty. Just creating the property will be a big help.

Since I can't record a macro and then clean it up, I am kind of lost...
0 Likes
478 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
See if this helps

Public Sub CustomProps()

Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oPropSets As PropertySets
Set oPropSets = oDoc.PropertySets

Dim oPropSet As PropertySet
Set oPropSet = oPropSets.item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")

Dim oProp As Property
Dim iPropID As Variant
vPropID = 2

On Error Resume Next
Call oPropSet.Add("", "Dwg Line 1")
Call oPropSet.Add("", "Dwg Line 2")


End Sub


--
KWiKMcad
Kent Keller
"dmikul" wrote in message news:6325948@discussion.autodesk.com...
We have created new drawing templates where the titleblock refers to custom
iProperties for the values. When we go into old drawings, we can copy/poste
the titleblock in but we need to create the custom iProperties every time
and this gets tedious. I need a simple macro to create custom fields for
"Dwg Line 1", "Dwg Line 2", "EN#" etc. The values can be empty. Just
creating the property will be a big help.

Since I can't record a macro and then clean it up, I am kind of lost...
0 Likes
Message 3 of 3

Anonymous
Not applicable
Kent - THANKS! That worked beautifully. I really appreciate the help. Dave
0 Likes