.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

foreach MText in C#

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Jyh2003
584 Views, 2 Replies

foreach MText in C#

How can I write foreach to list all MText object in 0 layer ?

 

Thanks in advance.

2 REPLIES 2
Message 2 of 3
_gile
in reply to: Jyh2003

Hi,

 

You can use the Editor.SelectAll() method with a SelectionFilter or, if you need to also search within the block, iterate through all the BlockTableRecordS in BlockTable and foreach BlockTableRecord iterate through all ObjectId, check if the object is a MText and if its Layer is "0".



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3
Jyh2003
in reply to: _gile

Sorry for my late reply, the issue has been resolved.

Thank you very much!

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost