Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi everybody!
We are working on Cadprocess and wonderig how to directly import the part numbers from the 3D files and extract them into a text/excel file.
We saw it in a short demo but we couldn't replay it.
Anybody can help us?
Thanks for all comments!
Saluti
Massimo
Solved! Go to Solution.
Not sure if this worked for you or not, but wanted to post the result from last week so everyone had access.
Macro Export_List
Define E1 as Element
Define myID as String
Define myName as String
Define Output as String
Define Export_Local as String
Export_Local = StripFileName(ActiveDoc.Path) + "\" + StripExt(ActiveDoc.Name) + ".xml"
Select None
Select If Object_Info Exists
E1 = ActiveDoc.FirstSelectedElement
FNew Export_Local
While (Exists(E1) = True)
myID = E1.Info.Id
myName = E1.Info.Name
Output = myID + " " + myName
Fwrite Export_Local Output
E1 = E1.NextSelectedElement
End While
Select None
Message "File Exported"
End Macro
Hi Marino,
IMHO it is not possible to import some partsinformation into the 3D-Model. What you can do is change the data in the structure which is build while opening the 3D-Model into IsoDraw.
After Converting the 3D-Model into 2D you are in the position to export the structue-data e.g. into an XML file.
Is it that what you meant?
Best regards
Hi Markus,
thanks for your reply. I really appreciate it!
In fact, the question was not clear enough.
We usually open 3d files from customers and we are trying to save the BOM list (position and part numbers) in a text or whatever file to use it on other software.
What's the step-by-step procedure? Is there any automatic way to save the complete BOM list in one step.
Thanks and regards!
Massimo
Hi Marino,
are you owner of the handbook "User's reference" (you can download it from the PTC homepage)?
In the englisch version on page 136 you can read how to set the preferences of an "object list"export.
You can export the structure of the 3D-Model (in opposition of my last statement) as an XML-file (just switch to export > XCF File). You can open this XML-file in every text-editor you want.
Did that help?
Best regards
Thanks, Markus.
Probabily yes!
I will let you know tomorrow!
Thanks again!
Massimo
Not sure if this worked for you or not, but wanted to post the result from last week so everyone had access.
Macro Export_List
Define E1 as Element
Define myID as String
Define myName as String
Define Output as String
Define Export_Local as String
Export_Local = StripFileName(ActiveDoc.Path) + "\" + StripExt(ActiveDoc.Name) + ".xml"
Select None
Select If Object_Info Exists
E1 = ActiveDoc.FirstSelectedElement
FNew Export_Local
While (Exists(E1) = True)
myID = E1.Info.Id
myName = E1.Info.Name
Output = myID + " " + myName
Fwrite Export_Local Output
E1 = E1.NextSelectedElement
End While
Select None
Message "File Exported"
End Macro
Thanks Trevor and thanks Markus.
I can now export the part n/ with the callout.
I have another question but I will make a new post!
Thanks again!
Massimo