I am trying to get a model file name to export into the Isogen pcf file. I'm not having any success. Has anyone tried to do this? I'm familiar with editing the opcfhdr.ebs file. However, I'm a piping designer not a programmer, so my knowledge is limited.
Thanks,
Currently running XM and Acad 2008
Thank you for feedback. Glad to hear it worked.
According to Isogen Info document there is :-92 * CLIENT-DRAWING-IDENTIFIER variable that could be used in POS files as well.
Regards,
Artiom
Thank You! It works perfect! I modified it slightly to give it an attribute number that I could place on the output drawing with the .pos file. There maybe another or better way to get it on the drawing than what I did, but it works! Thanks again for your help!
Tommy
Hello Here is one of the way.
This is a function that should be added to opcfhdr.ebs
'//'// Function to write drawing name'//Public Function PCF_DRAWING_NAME(indentFlag As Integer) As Integer Dim nStat As Integer Dim compID As At_ComponentID Dim AreaName As String Dim documentName As String nStat = at_Component_getCurrID(compID) status = at_ComponentID_getDocumentName (documentName, CompID) documentName=FileParse$(documentName,3) documentName = UCase(documentName) If (nStat = AT_SUCCESS) Then If (indentFlag = 1) Then nStat = at_XchgWriteText (" ") End If nStat = at_XchgWritelnText ("DRAWING NAME "+documentName) End If PCF_DRAWING_NAME = nStatEnd Function
'//'// Function to write drawing name'//
Public Function PCF_DRAWING_NAME(indentFlag As Integer) As Integer Dim nStat As Integer Dim compID As At_ComponentID Dim AreaName As String Dim documentName As String nStat = at_Component_getCurrID(compID) status = at_ComponentID_getDocumentName (documentName, CompID) documentName=FileParse$(documentName,3) documentName = UCase(documentName) If (nStat = AT_SUCCESS) Then If (indentFlag = 1) Then nStat = at_XchgWriteText (" ") End If nStat = at_XchgWritelnText ("DRAWING NAME "+documentName) End If PCF_DRAWING_NAME = nStatEnd Function
And Call for this function:
nStat = PCF_DRAWING_NAME(2)
As a result , heder should contain folowing information:
ISOGEN-FILES isogen.flsUNITS-BORE MMUNITS-CO-ORDS MMUNITS-BOLT-DIA MMUNITS-BOLT-LENGTH MMUNITS-WEIGHT KGSPIPELINE-REFERENCE ISO-A100-U100-L100PIPING-SPEC MCS150 AREA A100DRAWING NAME 123.DWG ATTRIBUTE31 ATTRIBUTE32 6" ATTRIBUTE34 123, ds ATTRIBUTE99 END
I hope this will help. Regards,Artiom