himurae
(dubai)
September 19, 2024, 12:48pm
1
hello people i have a progress mesh welding machine which only uses pxml format,now when i create meshes in revit and export to pxml the machine gives error
The xml namespace is already defined incorrectly in the file header (this is usually an export setting in CAD):
Instead of the: <PXML_Document xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema>
This must be in the header: <PXML_Document xmlns=http://progress-m.com/ProgressXML/Version1>
can you help me figure out how to correct this
Jean-Marc
(Jean-Marc Couffin)
September 19, 2024, 3:38pm
2
Hi, Welcome,
without the code, certainly not.
the error mentions you need to replace one header by another.
just making a routine to change it with txt related modules of python should do
himurae
(dubai)
September 20, 2024, 6:00am
3
sorry noobie here ,the correct file code looks like this
<?xml version="1.0" encoding="utf-8"?>
<PXML_Document xmlns="http://progress-m.com/ProgressXML/Version1">
<DocInfo>
<MajorVersion>1</MajorVersion>
<MinorVersion>3</MinorVersion>
</DocInfo>
<Order>
<OrderNo>50024S32</OrderNo>
<Storey>GF -</Storey>
<Component>SLAB</Component>
<DrawingNo>S32-B</DrawingNo>
<DrawingDate>21.08.2016</DrawingDate>
<DrawingAuthor>NemCAD Emirates DATAPC Earl</DrawingAuthor>
<GenericOrderInfo01>Phase 6 & 12 Villas</GenericOrderInfo01>
<GenericOrderInfo05>Seeb - Sur Al Hadid - Sul</GenericOrderInfo05>
<GenericOrderInfo09>Mohammed Abdullah Al Rais</GenericOrderInfo09>
<Product>
<ElementNo>61</ElementNo>
<ProductType>00</ProductType>
<TotalThickness>50</TotalThickness>
<PieceCount>0</PieceCount>
<Comment>lfdNr=0000;</Comment>
<StackNo>00002</StackNo>
<StackingSequence>001</StackingSequence>
<StackingLevel>001</StackingLevel>
<P1X>22925</P1X>
<P1Y>-36202</P1Y>
<P1Z>6600</P1Z>
<P2X>21925</P2X>
<P2Y>-36202</P2Y>
The incorrect file looks like this
<?xml version="1.0" encoding="utf-8"?>
<PXML_Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DocInfo>
<MajorVersion>1</MajorVersion>
<MinorVersion>3</MinorVersion>
</DocInfo>
<Order>
<Product>
<TotalThickness>0</TotalThickness>
<PieceCount>0</PieceCount>
<P1X>0</P1X>
<P1Y>0</P1Y>
<P1Z>0</P1Z>
<P2X>0</P2X>
<P2Y>0</P2Y>
<P2Z>0</P2Z>
<P3X>0</P3X>
<P3Y>0</P3Y>
<P3Z>0</P3Z>
<Slab>
<SlabNo>Rebar Cage</SlabNo>
<PartType>00</PartType>
<SlabArea>0</SlabArea>
<SlabWeight>0</SlabWeight>
<ProductionThickness>0</ProductionThickness>
<MaxLength>0</MaxLength>
<MaxWidth>0</MaxWidth>
<IronProjectionLeft>0</IronProjectionLeft>
<IronProjectionRight>0</IronProjectionRight>
<IronProjectionBottom>0</IronProjectionBottom>
<IronProjectionTop>0</IronProjectionTop>
<Steel Type="mesh">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<ToTurn>false</ToTurn>
<StopOnTurningSide>false</StopOnTurningSide>
<GenericInfo01>Fabric Sheet 2</GenericInfo01>
<MeshType>1</MeshType>
<ProdRotX>0</ProdRotX>
<ProdRotY>0</ProdRotY>
<ProdRotZ>0</ProdRotZ>
<Bar>
LINE no 2 needs to be changed how can i achieve it sir…
Hi @himurae , as @Jean-Marc already wrote, we can’t help you if you don’t show us at least the code snippets that you use to export the pxml.
Or are you manually exporting them? If so, this is not a pyRevit question, and any tool that can do search and replace on a text file will do the job.