Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Copy iProperties from IPT to IDW

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
967 Views, 7 Replies

Copy iProperties from IPT to IDW

We have a need to copy all of our iProperties from the model into the
IDW. I would like to do this on save of the file to make it seemless to the
user. We need to do this to help satisfy our document management software,
synergis adept. In Adept they have what they call a library card that gets
populated from the iProperties and since an IDW has no information in the
iProperties, it's all driven from the part, there is no information on the
library card. Adept has compensated for this by allowing the user to copy
those iProps after a file is signed in but it is a manual proccess. You
have to selecet the file in Adept and fire off the command, it works but
prone to being forgotten. So what I am asking for, since I am a hacker with
vba at best, is if anyone has some sample code they might be willing to
provide to get me started. Anything you have would be greatly appreciated,
thanks.

Corey
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

So I guess no one does this at all currently?


"Corey Parks" wrote in message
news:6393948@discussion.autodesk.com...
We have a need to copy all of our iProperties from the model into the
IDW. I would like to do this on save of the file to make it seemless to the
user. We need to do this to help satisfy our document management software,
synergis adept. In Adept they have what they call a library card that gets
populated from the iProperties and since an IDW has no information in the
iProperties, it's all driven from the part, there is no information on the
library card. Adept has compensated for this by allowing the user to copy
those iProps after a file is signed in but it is a manual proccess. You
have to selecet the file in Adept and fire off the command, it works but
prone to being forgotten. So what I am asking for, since I am a hacker with
vba at best, is if anyone has some sample code they might be willing to
provide to get me started. Anything you have would be greatly appreciated,
thanks.

Corey
Message 3 of 8
Anonymous
in reply to: Anonymous

Hi Corey,

Help actually covers iProperties pretty well. You are going to need to make
a addin, with a onSave event. You can't do it in VBA.

I am not sure, but is there a 100% direct correlation between part/assembly
files iProps and drawing iProps? If there is, you should just be able to
iterate through the part/assembly's iProps, and copy the values to the
drawings iProps... If not, you need to deal with the differences somehow.

Do all your drawing only contain views of one part or assembly?

--
KWiKMcad
Kent Keller
"Corey Parks" wrote in message
news:6395371@discussion.autodesk.com...
So I guess no one does this at all currently?


"Corey Parks" wrote in message
news:6393948@discussion.autodesk.com...
We have a need to copy all of our iProperties from the model into the
IDW. I would like to do this on save of the file to make it seemless to the
user. We need to do this to help satisfy our document management software,
synergis adept. In Adept they have what they call a library card that gets
populated from the iProperties and since an IDW has no information in the
iProperties, it's all driven from the part, there is no information on the
library card. Adept has compensated for this by allowing the user to copy
those iProps after a file is signed in but it is a manual proccess. You
have to selecet the file in Adept and fire off the command, it works but
prone to being forgotten. So what I am asking for, since I am a hacker with
vba at best, is if anyone has some sample code they might be willing to
provide to get me started. Anything you have would be greatly appreciated,
thanks.

Corey
Message 4 of 8
Anonymous
in reply to: Anonymous


 

No, they contain views of multiple files but the first inserted view is the
one that defines the title block information, which is what I would like to do
for this as well.  The first view inserted will define the parts used to
update the IDW iProps.  My skill level is not very high in this kind of
thing as of yet so this one might be beyond my abilities.  I have been
looking to find any kind of code that does something similar but have not found
anything in the help files or elsewhere.  With a piece of code that I know
what it does I can usually pick it apart and figure out the functionality and
then modify it for my own ends.  I guess what I really need to do is take
some more classes on vb to get this figured out.

 

 

Hi
Corey,

Help actually covers iProperties pretty well.  You are going
to need to make
a addin, with a onSave event.  You can't do it in
VBA.

I am not sure, but is there a 100% direct correlation between
part/assembly
files iProps and drawing iProps?   If there is, you
should just be able to
iterate through the part/assembly's iProps, and copy
the values to the
drawings iProps... If not, you need to deal with the
differences somehow.

Do all your drawing only contain views of one part
or assembly?

--
KWiKMcad
Kent Keller
"Corey Parks" <Reply in
group only> wrote in message

href="news:6395371@discussion.autodesk.com">news:6395371@discussion.autodesk.com
...
So
I guess no one does this at all currently?


"Corey Parks" <Reply in
group only> wrote in message

href="news:6393948@discussion.autodesk.com">news:6393948@discussion.autodesk.com
...
We
have a need to copy all of our iProperties from the model into the
IDW. 
I would like to do this on save of the file to make it seemless to
the
user.  We need to do this to help satisfy our document management
software,
synergis adept.  In Adept they have what they call a library
card that gets
populated from the iProperties and since an IDW has no
information in the
iProperties, it's all driven from the part, there is no
information on the
library card.  Adept has compensated for this by
allowing the user to copy
those iProps after a file is signed in but it is a
manual proccess.  You
have to selecet the file in Adept and fire off the
command, it works but
prone to being forgotten.  So what I am asking
for, since I am a hacker with
vba at best, is if anyone has some sample code
they might be willing to
provide to get me started.  Anything you have
would be greatly appreciated,
thanks.

Corey
Message 5 of 8
Anonymous
in reply to: Anonymous


Cory,

 

here is a start. 

 

If you want just want someone to write it,
 I am always looking for little jobs.  feel free to contact me.

 

 

Public Sub iProps()

 


Dim oDoc As DrawingDocument
Set oDoc =
ThisApplication.ActiveDocument

 

Dim oviewdoc As Document
Set oviewdoc =
oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument

 

Dim oViewPropSets As PropertySets
Set oViewPropSets =
oviewdoc.PropertySets

 

Dim oViewPropSet As PropertySet
Dim oViewProp As Property

 

Dim oDocProp As Property

 

 

 

For Each oViewPropSet In oViewPropSets

 

    For Each oViewProp In oViewPropSet
   

    On Error Resume
Next
       
oDoc.PropertySets(oViewPropSet.InternalName).ItemByPropId(oViewProp.PropId).Value
= oViewProp.Value
    If Error
Then
       
Err.Clear
    End If
   

    Next

 

Next


End Sub


--
KWiKMcad
Kent Keller


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
"Corey Parks" <Reply in group only> wrote in message
href="news:6395406@discussion.autodesk.com">news:6395406@discussion.autodesk.com
...


 

No, they contain views of multiple files but the first inserted view is
the one that defines the title block information, which is what I would like
to do for this as well.  The first view inserted will define the parts
used to update the IDW iProps.  My skill level is not very high in this
kind of thing as of yet so this one might be beyond my abilities.  I have
been looking to find any kind of code that does something similar but have not
found anything in the help files or elsewhere.  With a piece of code that
I know what it does I can usually pick it apart and figure out the
functionality and then modify it for my own ends.  I guess what I really
need to do is take some more classes on vb to get this figured out.

 

 

Hi
Corey,

Help actually covers iProperties pretty well.  You are
going to need to make
a addin, with a onSave event.  You can't do it
in VBA.

I am not sure, but is there a 100% direct correlation between
part/assembly
files iProps and drawing iProps?   If there is,
you should just be able to
iterate through the part/assembly's iProps, and
copy the values to the
drawings iProps... If not, you need to deal with
the differences somehow.

Do all your drawing only contain views of one
part or assembly?

--
KWiKMcad
Kent Keller
"Corey Parks"
<Reply in group only> wrote in message

href="news:6395371@discussion.autodesk.com">news:6395371@discussion.autodesk.com
...
So
I guess no one does this at all currently?


"Corey Parks" <Reply
in group only> wrote in message

href="news:6393948@discussion.autodesk.com">news:6393948@discussion.autodesk.com
...
We
have a need to copy all of our iProperties from the model into
the
IDW.  I would like to do this on save of the file to make it
seemless to the
user.  We need to do this to help satisfy our document
management software,
synergis adept.  In Adept they have what they
call a library card that gets
populated from the iProperties and since an
IDW has no information in the
iProperties, it's all driven from the part,
there is no information on the
library card.  Adept has compensated
for this by allowing the user to copy
those iProps after a file is signed
in but it is a manual proccess.  You
have to selecet the file in Adept
and fire off the command, it works but
prone to being forgotten.  So
what I am asking for, since I am a hacker with
vba at best, is if anyone
has some sample code they might be willing to
provide to get me
started.  Anything you have would be greatly
appreciated,
thanks.

Corey
Message 6 of 8
Anonymous
in reply to: Anonymous


Well it's going ok so far, at least I am learning a
bit but I ran into a problem.  I am trying to copy specific iprops from one
file to the other and I have all but the "Company" field working.  I have
no idea whay that one won't copy as I can copy other fields from that tab. 
Anyone have any ideas?

 

Public Sub CopyiPropsToIDW()
 

 

Dim oDoc As DrawingDocument
Set oDoc =
ThisApplication.ActiveDocument
 
Dim oviewdoc As Document
Set
oviewdoc =
oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument
 
Dim
oViewPropSets As PropertySets
Set oViewPropSets =
oviewdoc.PropertySets
 
Dim oViewPropSet As PropertySet
Dim
oViewProp As Property
 
Dim oDocProp As
Property
 
 CustomProps
 
              
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Description").Value
=
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Description").Value
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Vendor").Value
=
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Vendor").Value
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Cost
Center").Value =
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Cost
Center").Value
       
oDoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Comments").Value
=
oviewdoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Comments").Value
       
oDoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Company").Value
=
oviewdoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Company").Value
       

        oDoc.PropertySets("User Defined
Properties").Item("Equipment Type").Value = oviewdoc.PropertySets("User Defined
Properties").Item("Equipment
Type").Value
       
oDoc.PropertySets("User Defined Properties").Item("Line Name").Value =
oviewdoc.PropertySets("User Defined Properties").Item("Line
Name").Value
       
oDoc.PropertySets("User Defined Properties").Item("Asset Number").Value =
oviewdoc.PropertySets("User Defined Properties").Item("Asset
Number").Value
  

 


End Sub


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>


Cory,

 

here is a start. 

 

If you want just want someone to write it,
 I am always looking for little jobs.  feel free to contact me.

 

 

Public Sub iProps()

 


Dim oDoc As DrawingDocument
Set oDoc =
ThisApplication.ActiveDocument

 

Dim oviewdoc As Document
Set oviewdoc =
oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument

 

Dim oViewPropSets As PropertySets
Set oViewPropSets =
oviewdoc.PropertySets

 

Dim oViewPropSet As PropertySet
Dim oViewProp As Property

 

Dim oDocProp As Property

 

 

 

For Each oViewPropSet In oViewPropSets

 

    For Each oViewProp In
oViewPropSet
   
    On Error Resume
Next
       
oDoc.PropertySets(oViewPropSet.InternalName).ItemByPropId(oViewProp.PropId).Value
= oViewProp.Value
    If Error
Then
       
Err.Clear
    End If
   

    Next

 

Next


End Sub


--
KWiKMcad
Kent Keller


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
"Corey Parks" <Reply in group only> wrote in message
href="news:6395406@discussion.autodesk.com">news:6395406@discussion.autodesk.com
...


 

No, they contain views of multiple files but the first inserted view is
the one that defines the title block information, which is what I would like
to do for this as well.  The first view inserted will define the parts
used to update the IDW iProps.  My skill level is not very high in this
kind of thing as of yet so this one might be beyond my abilities.  I
have been looking to find any kind of code that does something similar but
have not found anything in the help files or elsewhere.  With a piece
of code that I know what it does I can usually pick it apart and figure out
the functionality and then modify it for my own ends.  I guess what I
really need to do is take some more classes on vb to get this figured
out.

 

 

Hi
Corey,

Help actually covers iProperties pretty well.  You are
going to need to make
a addin, with a onSave event.  You can't do
it in VBA.

I am not sure, but is there a 100% direct correlation
between part/assembly
files iProps and drawing iProps?   If
there is, you should just be able to
iterate through the part/assembly's
iProps, and copy the values to the
drawings iProps... If not, you need
to deal with the differences somehow.

Do all your drawing only
contain views of one part or assembly?

--
KWiKMcad
Kent
Keller
"Corey Parks" <Reply in group only> wrote in message

href="news:6395371@discussion.autodesk.com">news:6395371@discussion.autodesk.com
...
So
I guess no one does this at all currently?


"Corey Parks"
<Reply in group only> wrote in message

href="news:6393948@discussion.autodesk.com">news:6393948@discussion.autodesk.com
...
We
have a need to copy all of our iProperties from the model into
the
IDW.  I would like to do this on save of the file to make it
seemless to the
user.  We need to do this to help satisfy our
document management software,
synergis adept.  In Adept they have
what they call a library card that gets
populated from the iProperties
and since an IDW has no information in the
iProperties, it's all driven
from the part, there is no information on the
library card.  Adept
has compensated for this by allowing the user to copy
those iProps after
a file is signed in but it is a manual proccess.  You
have to
selecet the file in Adept and fire off the command, it works but
prone to
being forgotten.  So what I am asking for, since I am a hacker
with
vba at best, is if anyone has some sample code they might be willing
to
provide to get me started.  Anything you have would be greatly
appreciated,
thanks.

Corey
Message 7 of 8
Anonymous
in reply to: Anonymous


Try

       
oDoc.PropertySets("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}").Item("Company").Value
=
oViewDoc.PropertySets("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}").Item("Company").Value


--
KWiKMcad
Kent Keller


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
"Corey Parks" <Reply in group only> wrote in message
href="news:6396428@discussion.autodesk.com">news:6396428@discussion.autodesk.com
...


Well it's going ok so far, at least I am learning
a bit but I ran into a problem.  I am trying to copy specific iprops from
one file to the other and I have all but the "Company" field working.  I
have no idea whay that one won't copy as I can copy other fields from that
tab.  Anyone have any ideas?

 

Public Sub
CopyiPropsToIDW()
 

 

Dim oDoc As DrawingDocument
Set oDoc =
ThisApplication.ActiveDocument
 
Dim oviewdoc As Document
Set
oviewdoc =
oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument
 
Dim
oViewPropSets As PropertySets
Set oViewPropSets =
oviewdoc.PropertySets
 
Dim oViewPropSet As PropertySet
Dim
oViewProp As Property
 
Dim oDocProp As
Property
 
 CustomProps
 
              
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Description").Value
=
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Description").Value
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Vendor").Value
=
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Vendor").Value
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Cost
Center").Value =
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Cost
Center").Value
       
oDoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Comments").Value
=
oviewdoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Comments").Value
       
oDoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Company").Value
=
oviewdoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Company").Value
       

        oDoc.PropertySets("User Defined
Properties").Item("Equipment Type").Value = oviewdoc.PropertySets("User
Defined Properties").Item("Equipment
Type").Value
       
oDoc.PropertySets("User Defined Properties").Item("Line Name").Value =
oviewdoc.PropertySets("User Defined Properties").Item("Line
Name").Value
       
oDoc.PropertySets("User Defined Properties").Item("Asset Number").Value =
oviewdoc.PropertySets("User Defined Properties").Item("Asset
Number").Value
  

 


End Sub


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>


Cory,

 

here is a start. 

 

If you want just want someone to write it,
 I am always looking for little jobs.  feel free to contact me.

 

 

Public Sub iProps()

 


Dim oDoc As DrawingDocument
Set oDoc =
ThisApplication.ActiveDocument

 

Dim oviewdoc As Document
Set oviewdoc =
oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument

 

Dim oViewPropSets As PropertySets
Set oViewPropSets =
oviewdoc.PropertySets

 

Dim oViewPropSet As PropertySet
Dim oViewProp As Property

 

Dim oDocProp As Property

 

 

 

For Each oViewPropSet In oViewPropSets

 

    For Each oViewProp In
oViewPropSet
   
    On Error Resume
Next
       
oDoc.PropertySets(oViewPropSet.InternalName).ItemByPropId(oViewProp.PropId).Value
= oViewProp.Value
    If Error
Then
       
Err.Clear
    End If
   

    Next

 

Next


End Sub


--
KWiKMcad
Kent Keller


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
"Corey Parks" <Reply in group only> wrote in message
href="news:6395406@discussion.autodesk.com">news:6395406@discussion.autodesk.com
...


 

No, they contain views of multiple files but the first inserted view
is the one that defines the title block information, which is what I would
like to do for this as well.  The first view inserted will define the
parts used to update the IDW iProps.  My skill level is not very high
in this kind of thing as of yet so this one might be beyond my
abilities.  I have been looking to find any kind of code that does
something similar but have not found anything in the help files or
elsewhere.  With a piece of code that I know what it does I can
usually pick it apart and figure out the functionality and then modify it
for my own ends.  I guess what I really need to do is take some more
classes on vb to get this figured out.

 

 

Hi
Corey,

Help actually covers iProperties pretty well.  You are
going to need to make
a addin, with a onSave event.  You can't do
it in VBA.

I am not sure, but is there a 100% direct correlation
between part/assembly
files iProps and drawing iProps?   If
there is, you should just be able to
iterate through the
part/assembly's iProps, and copy the values to the
drawings iProps...
If not, you need to deal with the differences somehow.

Do all your
drawing only contain views of one part or assembly?

--

KWiKMcad
Kent Keller
"Corey Parks" <Reply in group only>
wrote in message

href="news:6395371@discussion.autodesk.com">news:6395371@discussion.autodesk.com
...
So
I guess no one does this at all currently?


"Corey Parks"
<Reply in group only> wrote in message

href="news:6393948@discussion.autodesk.com">news:6393948@discussion.autodesk.com
...
We
have a need to copy all of our iProperties from the model into
the
IDW.  I would like to do this on save of the file to make it
seemless to the
user.  We need to do this to help satisfy our
document management software,
synergis adept.  In Adept they have
what they call a library card that gets
populated from the iProperties
and since an IDW has no information in the
iProperties, it's all driven
from the part, there is no information on the
library card.  Adept
has compensated for this by allowing the user to copy
those iProps
after a file is signed in but it is a manual proccess.  You
have
to selecet the file in Adept and fire off the command, it works
but
prone to being forgotten.  So what I am asking for, since I am
a hacker with
vba at best, is if anyone has some sample code they might
be willing to
provide to get me started.  Anything you have would
be greatly appreciated,
thanks.

Corey
Message 8 of 8
Anonymous
in reply to: Anonymous


Thanks didn't realize top and bottom of the window
on that tab had different internal Id's.  Works great now.


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>


Try

       
oDoc.PropertySets("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}").Item("Company").Value
=
oViewDoc.PropertySets("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}").Item("Company").Value


--
KWiKMcad
Kent Keller


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
"Corey Parks" <Reply in group only> wrote in message
href="news:6396428@discussion.autodesk.com">news:6396428@discussion.autodesk.com
...


Well it's going ok so far, at least I am
learning a bit but I ran into a problem.  I am trying to copy specific
iprops from one file to the other and I have all but the "Company" field
working.  I have no idea whay that one won't copy as I can copy other
fields from that tab.  Anyone have any ideas?

 

Public Sub
CopyiPropsToIDW()
 

 

Dim oDoc As DrawingDocument
Set oDoc =
ThisApplication.ActiveDocument
 
Dim oviewdoc As Document
Set
oviewdoc =
oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument
 
Dim
oViewPropSets As PropertySets
Set oViewPropSets =
oviewdoc.PropertySets
 
Dim oViewPropSet As PropertySet
Dim
oViewProp As Property
 
Dim oDocProp As
Property
 
 CustomProps
 
              
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Description").Value
=
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Description").Value
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Vendor").Value
=
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Vendor").Value
       
oDoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Cost
Center").Value =
oviewdoc.PropertySets("{32853F0F-3444-11D1-9E93-0060B03C1CA6}").Item("Cost
Center").Value
       
oDoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Comments").Value
=
oviewdoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Comments").Value
       
oDoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Company").Value
=
oviewdoc.PropertySets("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}").Item("Company").Value
       

        oDoc.PropertySets("User
Defined Properties").Item("Equipment Type").Value =
oviewdoc.PropertySets("User Defined Properties").Item("Equipment
Type").Value
       
oDoc.PropertySets("User Defined Properties").Item("Line Name").Value =
oviewdoc.PropertySets("User Defined Properties").Item("Line
Name").Value
       
oDoc.PropertySets("User Defined Properties").Item("Asset Number").Value =
oviewdoc.PropertySets("User Defined Properties").Item("Asset
Number").Value
  

 


End Sub


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>


Cory,

 

here is a start. 

 

If you want just want someone to write
it,  I am always looking for little jobs.  feel free to contact
me.

 

 

Public Sub iProps()

 


Dim oDoc As DrawingDocument
Set oDoc =
ThisApplication.ActiveDocument

 

Dim oviewdoc As Document
Set oviewdoc =
oDoc.Sheets(1).DrawingViews(1).ReferencedDocumentDescriptor.ReferencedDocument

 

Dim oViewPropSets As PropertySets
Set oViewPropSets =
oviewdoc.PropertySets

 

Dim oViewPropSet As PropertySet
Dim oViewProp As Property

 

Dim oDocProp As Property

 

 

 

For Each oViewPropSet In oViewPropSets

 

    For Each oViewProp In
oViewPropSet
   
    On Error Resume
Next
       
oDoc.PropertySets(oViewPropSet.InternalName).ItemByPropId(oViewProp.PropId).Value
= oViewProp.Value
    If Error
Then
       
Err.Clear
    End If
   

    Next

 

Next


End Sub


--
KWiKMcad
Kent Keller


style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
"Corey Parks" <Reply in group only> wrote in message
href="news:6395406@discussion.autodesk.com">news:6395406@discussion.autodesk.com
...


 

No, they contain views of multiple files but the first inserted
view is the one that defines the title block information, which is what
I would like to do for this as well.  The first view inserted will
define the parts used to update the IDW iProps.  My skill level is
not very high in this kind of thing as of yet so this one might be
beyond my abilities.  I have been looking to find any kind of code
that does something similar but have not found anything in the help
files or elsewhere.  With a piece of code that I know what it does
I can usually pick it apart and figure out the functionality and then
modify it for my own ends.  I guess what I really need to do is
take some more classes on vb to get this figured out.

 

 

Hi
Corey,

Help actually covers iProperties pretty well.  You
are going to need to make
a addin, with a onSave event.  You
can't do it in VBA.

I am not sure, but is there a 100% direct
correlation between part/assembly
files iProps and drawing
iProps?   If there is, you should just be able to
iterate
through the part/assembly's iProps, and copy the values to the

drawings iProps... If not, you need to deal with the differences
somehow.

Do all your drawing only contain views of one part or
assembly?

--
KWiKMcad
Kent Keller
"Corey Parks"
<Reply in group only> wrote in message

href="news:6395371@discussion.autodesk.com">news:6395371@discussion.autodesk.com
...
So
I guess no one does this at all currently?


"Corey Parks"
<Reply in group only> wrote in message

href="news:6393948@discussion.autodesk.com">news:6393948@discussion.autodesk.com
...
We
have a need to copy all of our iProperties from the model into
the
IDW.  I would like to do this on save of the file to make it
seemless to the
user.  We need to do this to help satisfy our
document management software,
synergis adept.  In Adept they
have what they call a library card that gets
populated from the
iProperties and since an IDW has no information in the
iProperties,
it's all driven from the part, there is no information on the
library
card.  Adept has compensated for this by allowing the user to
copy
those iProps after a file is signed in but it is a manual
proccess.  You
have to selecet the file in Adept and fire off
the command, it works but
prone to being forgotten.  So what I
am asking for, since I am a hacker with
vba at best, is if anyone has
some sample code they might be willing to
provide to get me
started.  Anything you have would be greatly
appreciated,
thanks.

Corey

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report