Hi, please send your .dyn file so we can help you.
Hi, this script only works with mtext that is within the polyline. If you want it to work with text outside the polylines then you would need to modify the script. One thing you could try is scaling the polylne geometry just before the surface.patch node.
I converted all the text entities to MText before running the script. However, even when the MText is located within the polyline boundary, the elevation assignment still doesn’t happen.
Hm I would try the below:
- check the warning messages in dynamo, where is it failing?
- check the units are in metres for the drawing
- check the mtext values are just the number with no formatting and in metres eg 87.34
- rather than convert the text to mtext you could swap the mtext.context node for text.contents node, this would avoid formatting issues. I only used mtext node because my source data is always mtext.
- is the elevation of the mtext at zero? you could add a node similar to the node for the polylines to set the elevation to zero.
I have tried in all the way i know it’s not happening. Please share if any prelim set up to be done like polyline closed and zero elevation. mtext with elevation and both in seperate blocks? Am trying the same
Can you send a screenshot of the warning in dynamo?
The only requirements are as you listed. Not sure what you mean about blocks, the text and polylines shouldn’t be in block references, it won’t work if that is the case.
- In object. Geometry node: unable to create line, points are likely coincident.
- object. Location cannot be resolved
- surface.bypatch: could not make patch surface-API FAILED -Operation unsuccessful
- geometry. Does intersect dereferencing non pointer
- rest all operation failed
these are the errors.
Try using the AutoCAD command OVERKILL with a suitable tolerance, it sounds like you have duplicate vertices and mtext objects.
Make sure you have exactly the same amount of text objects and polylines.
Also check you have model scaling set to extra large, maybe your coordinates are big?
Thanks, Mr. will. But I couldn’t get. Tried as suggested.
I don’t know what else to suggest but the code is very basic and there are only 2 input objects so I think there is something wrong with your data. Start with just one mtext and one polyline at zero elevations, clean formatting. Polylines can commonly have overlapping vertices and get themselves twisted up so it’s essential to get them cleaned up first.
