Data extraction - data & suffix split

Data extraction - data & suffix split

Anonymous
Not applicable
949 Views
9 Replies
Message 1 of 10

Data extraction - data & suffix split

Anonymous
Not applicable

Is there a way to do data extraction in such a way that the suffix (m²) will appear in a separate cell from the numerical data? Currently the data extraction enters number&m² in the same cell and in this way I cannot get the total sum in excel. The whole process needs to be fully automated, so splitting function (data->text to columns) in excel is not a solution.

Accepted solutions (1)
950 Views
9 Replies
Replies (9)
Message 2 of 10

MMcCall402
Mentor
Mentor

Use two separate attributes?  One for the value and one for the suffix?   They could be strategically placed so they appear like they're one attribute.

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

0 Likes
Message 3 of 10

ara_neresesian
Collaborator
Collaborator

Hi

this is a trick , 

1-before dataextraction you can erase m2 by find and replace

2- you can do it in excel with same way , or you can add a macro to trim right 2 character in excel.

Good luck

 

Message 4 of 10

Anonymous
Not applicable

I need to set it up in such way that in the future only data extraction is required. No additional manipulation like "find & replace". Will your macro option be like that? Or does it need to be done after each extraction?  

0 Likes
Message 5 of 10

Anonymous
Not applicable

We are using this option in the moment, but we end up with bigger numbers shifting to the left.  It does not look neat and presentable. I was trying to find an improvement.

Explanation:

Our usual attributes have justification "middle-center". In the case of calculating square meters, the center is in the middle between attribute containing numerical value and attribute containing"m²".

The small numbers are nicely centered, like for example 1m² or 5m².

The big numbers are shifted left, for example 15000m², or 500000m²

I hope that Autocad will improve this in the future. 

0 Likes
Message 6 of 10

MMcCall402
Mentor
Mentor

Can you give us a little insight into what this block is and how its used?

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

0 Likes
Message 7 of 10

SeeMSixty7
Advisor
Advisor

AutoCAD offers a number of ways to accomplish something. It's not a matter of Autodesk improving this in the future. It is a matter of finding a way that works for you and the tool you are using.

A few options have already been offered, granted it seems like you want one that is as few steps as possible to eliminate potential error.

1. Extract the data as you already have and use what @ara_neresesian  stated and use a function(macro) in Excel to strip off the suffix. 

2. Since your unit will be the same for all these, you could use a field suffix and have the field attached to a value placed somewhere in your dwg. Then prior to extraction set it to a ".0" then extract and rest it back to m2.

3. Create a lisp routine to extract the data and strip the suffix off and generate the file.

4. Create a database link to the data that has the data in a database table somewhere, generate a sql statement or a view that provides the data without the suffix and summarizes the value for you.

 

You could go on and on with how many different ways you could do it.

There is a Customization section here as well where a lot of people will just write something up for you. What you are asking for is pretty simple, you just need to provide your block and the format you want it to result in.

 

Good luck,

0 Likes
Message 8 of 10

Anonymous
Not applicable

Please see the attached dwg containing the block. 

 

I wish to have it set-up in such a way that when I extract data into excel I can copy/paste the data into pre-set excel page with formulas to calculate total square meters according to groups.

I also wish to link the area attribute with polyline without going through all steps that are currently required.

You will see what I mean if you delete the rectangle it is linked to and try to link the area attribute with another new closed polyline - lots of steps that must be repeated with each instance this block is used in.

I have already learned on this forum that the conversion factor can be built into FORMULA in the FIELD CATEGORY, so that helps knowing I should use FORMULA instead of OBJECT, but I don't know how to combine everything I need into one attribute. My end goal is this pre-set attribute, with middle-centre justification:

OBJECT AREA * CONVERSION FACTOR (mm to m) & "m²"

I want all of this to look on a drawing like this: 12m²

And when extracted in excel like this: 12 

 

 

0 Likes
Message 9 of 10

MMcCall402
Mentor
Mentor
Accepted solution

Yes, changing the focus of fields can be a pain.  I wish there was a simple tool to do without messing up format.

 

Some Ideas:

If you copy and paste the block with its associated polyline together, the resulting pair of objects are associated to each other.

 

If the polyline area is always a rectangle, it could be placed within the block along with some dynamic parameters with grips to move and reshape it. The attributes would have fields to this internal polyline object and display the values of that block.

Mark Mccall 
CAD Mangler


EESignature


VHB - Vanasse Hangen Brustlin, Inc.


Linkedin

0 Likes
Message 10 of 10

Anonymous
Not applicable

Thank you!

 

I have managed to combine various functions (block dwg attached) and came up with a solution I believe is the closest possible to my needs.

Autocad needs to improve this function, it is tedious! With each instance I have to click 9 times (try changing the linked area from circle to rectangle) ...

And then I have to sort out the data in excel with pre-set formulas. This could be fun for me, but my colleagues may struggle. Calculating the area is very basic function in architecture, it should not require so many steps to achieve simple area comparison table ... 

0 Likes