• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

problem with code for selection of only visible blocks

  • Thread starter Thread starter yag
  • Start date Start date

yag

Guest
Hello

I would like to write two rows of code to select through the xxxx function all visible blocks

But I don't understand why it doesn't work! the not working is equal to always select all the elements

here are the two lines of code that I use:
Code:
        filtertype(0) = 60
        filterdata(0) = 0   
        sset.select acselectionsetall, , , filtertype, filterdata
Where am I wrong?

where do I find all the options available with filterdata and filtertype?

everything has to go on autocad 2007
 
Hello

I would like to write two rows of code to select through the xxxx function all visible blocks

But I don't understand why it doesn't work! the not working is equal to always select all the elements

here are the two lines of code that I use:
Code:
        filtertype(0) = 60
        filterdata(0) = 0   
        sset.select acselectionsetall, , , filtertype, filterdata
Where am I wrong?

where do I find all the options available with filterdata and filtertype?

everything has to go on autocad 2007

with what you wrote selects what is visible, without saying that you need blocks
to say "blocks" & "visible" you must write:
Code:
        filtertype(0) = 0:    filterdata(0) = "insert"   
        filtertype(1) = 60:   filterdata(1) = 1   
        sset.select acselectionsetall, , , filtertype, filterdata
and dimension to 1 the two filtertype and filterdata vectors
note: in this way select the "block references" and not the "blocks". but I think it's what you need because the blocks are never visible in a drawing, while their inserts are

filtertype and filterdata options can be found in the "dxf reference" on the autodesk site ("http://usa.autodesk.com/adsk/servlet/item?siteid=123112&id=12272454&linkid=10809853") choose the correct autocad version and look at the first chapter

Hi.
 

with what you wrote selects what is visible, without saying that you need blocks
to say "blocks" & "visible" you must write:
Code:
        filtertype(0) = 0:    filterdata(0) = "insert"   
        filtertype(1) = 60:   filterdata(1) = 1   
        sset.select acselectionsetall, , , filtertype, filterdata
and dimension to 1 the two filtertype and filterdata vectors
note: in this way select the "block references" and not the "blocks". but I think it's what you need because the blocks are never visible in a drawing, while their inserts are

filtertype and filterdata options can be found in the "dxf reference" on the autodesk site ("http://usa.autodesk.com/adsk/servlet/item?siteid=123112&id=12272454&linkid=10809853") choose the correct autocad version and look at the first chapter

Hi.
but must I put the : ?
 
I've tried it's not the same.
Before instruction sset.select insert a zoomextents not to exclude block inserts outside the current zoom window.
and eye I had mistakenly written filterdata(1)=1 while it must be =0 to select the visible.
If it's not qs then put your dwg and your dvb.
Hi.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top