Jump to content

Text object extraction to XML file


KristjanT

Recommended Posts

Hi!

 

Is it possible somehow to extract text objects (height values as plain text) to XML file containing the X; Y location value and the text "value" itself?

Example of the output data is done in AutoCAD. The main goal is to get source data for side model generation. Would really like to skip the AutoCAD part of the workflow.

 image.thumb.png.7675b3caa5a90e79e5fb244f67ecf546.pngimage.png.91559b9b6afa8cfd23288e85168251f2.png

Link to comment

Create a one line Vectorscript named TheText.  (Resource Manager, New Resource, Script)

 

WSScript_SetResStr(GetText(WSScript_GetObject));

 

Create a worksheet and a database row specifying the text objects (probably by layer or class and object type) you want to see they should show up as subrows ie 3.1, 3.2, etc.)

 

Enter formulas of 

 

=XCenter

=YCenter

=RunScript('TheText')

 

HTH

  • Like 2
Link to comment

Actually I am wrong.  There are four worksheet functions you might want to know about

 

BotBound

TopBound

LeftBound

RightBound

 

These will provide the extents of the bounding box.  This is different than the exact position of the edge of the text because it includes some margin, but is effectively the same thing I was looking to do with a script.

 

BotBound instead of XCenter

LeftBound instead of YCenter

 

Will get you about as close as you are going to get without converting the text to poly lines.

  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...