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

How can I get the Blockname inserted before I select the point on the drawing?

9 REPLIES 9
Reply
Message 1 of 10
kevinsir
451 Views, 9 Replies

How can I get the Blockname inserted before I select the point on the drawing?

Hello everyone, I have a problem. I select one block to insert . However,how can I get the Blockname before select the insered point?

I found the BlockTableRecord.BlockInsertionPoints event. It is meaning that  it can only apply to the whole BlockTableRecord type rather than some individual block references (AutoCAD INSERTs)

Is there any other event?

9 REPLIES 9
Message 2 of 10


@kevinsir wrote:

... I select one block to insert... However,how can I get the Blockname before select the insered point?


How you select block?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 10

Maybe there is an error. I mean inserting a new BlockReference. I select the  block on the menu ! 

Message 4 of 10


@kevinsir wrote:

Maybe there is an error. I mean inserting a new BlockReference. I select the  block on the menu ! 


What kind of menu? If you need help please explain this in details. Maybe with pictures...

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 5 of 10

menu 'insert'--"block"  then select one block from the combobox. Click the accept button then select the insert point on the paper. the problem is that  i want to get the block name by code before select the point.

Message 6 of 10

I could be wrong, but if you're trying to get the name of the block in an INSERT command before a insertion point specified, then you will not do such. It is possible only if block is from other dwg-file and in this case Database.BeginInsert event is occurring.

Think about what you want to do after and find another way.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 7 of 10

Your ideas may be a solution. However I want to do something individually by name of the blockrecord before  a new blockReference inserted!

Message 8 of 10


@kevinsir wrote:

Your ideas may be a solution. However I want to do something individually by name of the blockrecord before  a new blockReference inserted!


In this case look like you have to replace command INSERT with your's own command. I do not know what "something individually by name of the blockrecord"  you want to do, but may be that can be done not before, but after inserting of block?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 9 of 10

You're attempting to solve a larger problem using approaches that are myopic.

 

You can't for example, tell a user that they must use the INSERT dialog to insert blocks because your solution to the problem only works in that context.  IOW, there are many ways to insert a block besides the INSERT dialog, and the INSERT dialog allows the user to enter an insertion point in the dialog before they even choose the block.

 

IOW, it won't work.

 

Try describing the larger problem whcih leads you to believe that the way to solve the the problem is by handling events, because in my experience, that is usually not the best solution.

Message 10 of 10

Thanks, DiningPhilosopher ! I will try other ways !

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