can i write to custom file properties in a .dft

Hi

 

Is it not posible to write a new value to a custom file property.

 

 

if you open a .dft-document and go to file-properties-custom - here I have a property with:

name: Specification

Type: Text

Value: Olddescription

 

Can i change "Olddesription" to "Newdesription" using VB?

 

in solidworks i can use:

Dim swApp As SldWorks.SldWorks

Dim swModel As SldWorks.ModelDoc2

 

Sub NewPropValue()

set swapp = Application.Sldworks

set swmodel = swApp.ActiveDoc

swModel.customInfo2("", "Specification")_

= "NewDescription"

End Sub

 

 

 

Im not use to customising SE, so can anyone help? I use SE v12.07

 

br. Calle

 

 

Posted by: casper jensen
Post date: 7/21/2006 1:24:19 AM

2 REPLIES

RE: can i write to custom file properties in a .dft

Yes, it is possible. Assuming you have the file you want to change open in SE:

 

Public objApp As SolidEdgeFramework.Application

Public objDoc As SolidEdgeDraft.DraftDocument

Public objSheet As Object

 

Sub NewPropValue()

 

Set objApp = GetObject(, "SolidEdge.Application")

Set objDoc = objApp.ActiveDocument

Set objSheet = objApp.ActiveDocument.Properties

 

objSheet.Item("Custom").Item("Specification").Value = "Newdescription"

End Sub

 

Posted by: Bill Ledbetter
Post date: 7/21/2006 1:48:00 AM

RE: can i write to custom file properties in a .dft

thanks - It works very fine -

 

Posted by: casper jensen
Post date: 7/21/2006 2:15:48 AM