Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extract the attributes, and written table (help)

16 REPLIES 16
SOLVED
Reply
Message 1 of 17
Anonymous
1224 Views, 16 Replies

Extract the attributes, and written table (help)

Extract the attributes, and written table(or output excel) BOM ?

 

sshot-5.png

I think like this :

1step. run command
2step. choose all drawing in mode space. (crossing )
3step. Enter the text height (Text style is SIMPLEX, is style ,not font )
4step. Select (a) pick a baskpoint insert table (b)or output excel


Essential
1.Use Drawing number from top to bottom  order arrange
   Sort by the last three digits of drawing No.
eg.
1-SS706A-001
3-SS706A-002
2-SS706A-003
1-SS706A-004
1-SS706A-005

 

2.Check the PARTNAME , if have Duplicate PARTNAME ,SO Pop-up tips.
3.Check the DRAWING NO , if have Duplicate DRAWING NO ,SO Pop-up tips.

4.If insert table, Must: Layer is DIM , Text style is SIMPLEX, (is style ,not font )

 

Many thanks for help me!!!

 

See Attachments. for test.

16 REPLIES 16
Message 2 of 17
Luís Augusto
in reply to: Anonymous
Message 3 of 17
3wood
in reply to: Anonymous

For attribute management, the simplest tool is ATTOUT in Express Tools.

Just export attributes with ATTOUT, then adjust the table in Excel including hiding some rows/columns to suit your need, then copy/paste the table from Excel.

Message 4 of 17
Anonymous
in reply to: Anonymous

Very thanks for your reply ! But I can't try it by myself. because , I just know a little . when I have time, I will learn. Many thanks for help me!
Message 5 of 17
Anonymous
in reply to: Anonymous

I think I find a way ,

USE "ATTEXT" AND "EATTEXT " AND "ATTOUT "
Message 6 of 17
hmsilva
in reply to: Anonymous

Hi emk2012,
the attached is just a 'demo' and a starting point for you.

 

Try to read the code (don't just run code), try to understand the way how to collect the attributes, the desired tags, build a list with the attribute values,...
To write to excel, i did use Gilles Chanteau's gc:WriteExcel.

 

Hope that helps
Henrique

EESignature

Message 7 of 17
Anonymous
in reply to: hmsilva

Hi dear henrigue, I've been waiting for you to appear, Thanks !,I just try it ,but error:
Erreur: too few actual parameters
Message 8 of 17
Anonymous
in reply to: Anonymous

Dear henrigue,Can you give me a full version ? Not I don't want to do it myself, I really can't do it.
Message 9 of 17
hmsilva
in reply to: Anonymous

Hi emk2012

 

'Can you give me a full version ?'

 

the 'demo' is functional, with your TEST1.dwg works as expected.

 

'Erreur: too few actual parameters'

 

this error returns from Gilles's gc:WriteExcel function, possibly you are calling the function without one of the required parameters, did you try the code with your TEST1.dwg and without modifying the code?

 

 

Henrique

EESignature

Message 10 of 17
Anonymous
in reply to: hmsilva

Hi henrigue,thank you!
I See this:
(setq xlapp (vlax-get-or-create-object "Excel.Application"))
I think is about office , my PC in not install "Microsoft Office" is "openoffice"
I test on other PC with microsoft office, ok! generate Demo.xls.
But,No need current drawing, I need select objects in the current drawing.
and I neet check function:
1.Check the PARTNAME , if have Duplicate PARTNAME ,SO Pop-up tips.
2.Check the DRAWING NO , if have Duplicate DRAWING NO ,SO Pop-up tips.
In a dwg file ,Usually have 200~500 drawings , Each drawing has different "PARTNAME" and different "DRAWING NO."
Because , This contents must be input to ERP system , Can not be repeated !
If the same name exists, no output xls file, Pop-up tips.
I appriciate your help!
Message 11 of 17
hmsilva
in reply to: Anonymous


@Anonymous wrote:

(setq xlapp (vlax-get-or-create-object "Excel.Application"))
I think is about office , my PC in not install "Microsoft Office" is "openoffice"

Hi emk2012,

 

I never used "openoffice", so I can't assist on this, hopefully someone else can.

 

Henrique

EESignature

Message 12 of 17
Anonymous
in reply to: hmsilva

Thanks very much !Henrique,
I can use microsoft office ,This is not a problem!
Now,can you help me? Sincerely thank you !
if check function is difficult ,
so I hope you can help me this:
Select objects in the current drawing. not all objects!

Message 13 of 17
hmsilva
in reply to: Anonymous

Just remove the "_X" from the ssget...

 

Henrique

EESignature

Message 14 of 17
Anonymous
in reply to: hmsilva

Great ! henrique, Thanks so much! The last request : Can choose the output path ? Thank you very much again
Message 15 of 17
hmsilva
in reply to: Anonymous


@Anonymous wrote:
 Can choose the output path ?

Done...

 

Henrique

EESignature

Message 16 of 17
Anonymous
in reply to: hmsilva

Hi Henrique Very good! Admire you! Thank you very much!
Message 17 of 17
hmsilva
in reply to: Anonymous

You're welcome, emk2012.
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost