Text in title blocks from Solid Edge into Access database

 

Hi Jason,

Is it possible to extract the data from title blocks(i.e texts such as project name, end user etc) in solid edge into either an access database or excel spread sheet using VB.NET?? Please help. Thanks, Chinna.

 

Posted by: chinna raju
Post date: 8/18/2009 5:18:14 PM

4 REPLIES

RE: Text in title blocks from Solid Edge into Access database

Hi umctigers,

 

all the data are in Solid Edge Properties. You must read the File Properties (with PropAuto.dll).

 

 

 

 

 

 

Posted by: JR
Post date: 8/18/2009 7:34:45 PM

RE: Text in title blocks from Solid Edge into Access database

 

Hi JR,

Thanks for the reply. I got some text boxes in the title block in my drawing. Is there a way i can extract the textbox values on to a VB Form. I want to save these values from VB into an access database.Can you please give me a sample code. Thanks.

 

Posted by: chinna raju
Post date: 8/20/2009 2:47:06 PM

RE: Text in title blocks from Solid Edge into Access database

 

Hi,

 

this is a coding for get the value of texbox:

 

Dim objApp As SolidEdgeFramework.Application

Dim objDoc As SolidEdgeDraft.DraftDocument

Dim objSheet As SolidEdgeDraft.Sheet

Dim objTextBox As SolidEdgeFrameworkSupport.TextBox

Dim objTextBoxes As SolidEdgeFrameworkSupport.TextBoxes

dim sValue as String

 

'Connect to Solid Edge

objApp = Marshal.GetActiveObject("SolidEdge.Application")

 

'Get Reference to active document

objDoc = objApp.ActiveDocument

 

'ex. loop for all sheets

'or only for working section:

'objDraft.Sections.WorkingSection.Sheets

'or for active sheet:

'objSheet = objDraft.ActiveSheet

'...

For each objSheet in objDoc.Sheets

objTextBoxes =objSheet.textboxes

For each objTextBox in objTextBoxes

'the Value:

sValue =objTextbox.Text

Marshal.ReleaseComObject(objTextBox)

objTextBox = Nothing

Next

Marshal.ReleaseComObject(objTextBoxes)

objTextBoxes = Nothing

Marshal.ReleaseComObject(objSheet)

objSheet = Nothing

Next

Marshal.ReleaseComObject(objDoc )

objDoc = Nothing

Marshal.ReleaseComObject(objApp)

objApp = Nothing

 

Posted by: JR
Post date: 8/20/2009 7:46:22 PM

RE: Text in title blocks from Solid Edge into Access database

 

JR,

Thanks a ton. It worked!!!

Have a great day.

Umctigers

 

Posted by: chinna raju
Post date: 8/22/2009 6:03:07 AM