We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Reading DWG2018 files: regression getting MultiText values


We noticed a difference in behavior reading DWG 2018 files compared to older versions.
Reading a DWG 2018 file and trying to get the text of a multiline attribute, we use the following code:

CadAttrib cadAttrib = … (getting the cadattrib from the document)
var theValueFromAspose = cadAttrib.MultiText.FullText;

In a normal scenario, this works fine
(but fyi; it seems that for DWG 2018 files, newlines are returned inside the string as “\P”, this is not the case for older DWG files, but this is no problem and something we already account for in our code)
So for example, the string here would be “text on line 1 \P text on line 2”

However, it seems that if the block has width scaling set (in our case to 0.9), the string returned is then:
“\W0.9000;text on line 1 \P text on line 2”

Could you advise me how I can get the text without any of that metadata in front?
I could easily foresee this and remove the preceding \W0.9000; (or other number if scaling is different), but perhaps there are other things that might get injected here for some reason as well that I don’t yet know about.

I can provide a sample if you want.


I have observed the issue details shared by you and request you to please share the source file, used sample code and generated output file with us. Please also share the desired output file with us for reference. I also suggest you to please first try using latest version on your end too.

DwgMultilineIssue.zip (268.6 KB)
I have included a sample console application that illustrates the point.
The 2 first attributes are examples where the \W0.900; part gets prefixed in the MultiText’s value, but it’s fine in the “DefaultText” (although there it misses the \p for newlines but that doesn’t really matter for our use case).

So, in these 2 cases, it would be suffiicient for us to use DefaultText.
However in some other cases (see the 3rd sample), it seems that DefaultText does not always contain the text of all the lines.

If you have any insight for us, that would be great :slight_smile:


I have observed the sample project shared by you. An issue with ID CADNET-1014 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be addressed.