You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there I am trying to convert a .dwg file into a .pdf file using Rhino-compute and Grasshopper in Node Js. I am using the compute-rhino3d npm package.
I am passing the path of a grasshopper definition file (.ghx) to rhinoCompute.Grasshopper.evaluateDefinition() function. But the rhino.compute throws the following exception.
System.Xml.XmlException: 'Data at the root level is invalid. Line 1, position 1.'
Do you have an output "RH_OUT:myresponse" type object in your file?
I have a grasshopper file that generates a pdf of the given .dwg file. Now I am passing the grasshopper file through the Rhino App server. I am getting a different error this time,
"System.Exceptions.PayAttentionException: 'Looks like you've missed something..."
From GrasshopperDefinition.cs file
if (outputSchema.Values.Count < 1)
throw new System.Exceptions.PayAttentionException("Looks like you've missed something..."); // TODO
Hi there I am trying to convert a .dwg file into a .pdf file using Rhino-compute and Grasshopper in Node Js. I am using the compute-rhino3d npm package.
I am passing the path of a grasshopper definition file (.ghx) to rhinoCompute.Grasshopper.evaluateDefinition() function. But the rhino.compute throws the following exception.
System.Xml.XmlException: 'Data at the root level is invalid. Line 1, position 1.'
Here is my node js code.
`const rhinoCompute = require('compute-rhino3d');
rhinoCompute.url = 'http://localhost:8081/';
exports.rhino = async (req, res) => {
console.log(req.body);
try {
const dwgFilePath = req.file.path;
console.log(dwgFilePath);
const definition =
'C:\Users\Sohaib\Documents\gh\Planometric_GH_tester_xml_version.ghx';
const outputPath = 'C:\Users\Sohaib\Documents';
const trees = [
{
data: {
FilePath: 'C:\Users\Sohaib\Documents\gh\file-1686857280276.dwg',
},
},
{ data: { outputPath } },
];
// Convert the .dwg file to .pdf using Grasshopper and Rhino.Compute
const result = await rhinoCompute.Grasshopper.evaluateDefinition(
definition,
trees
);
// Send the converted .pdf file as a response
res.send(result);
} catch (error) {
console.error(error);
res.status(500).send('An error occurred during the conversion.');
}
};
`
The text was updated successfully, but these errors were encountered: