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

Block-Functions (Select, Explode, etc.)

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
klahie
5206 Views, 22 Replies

Block-Functions (Select, Explode, etc.)

Hi community!

 

I have a C#-WPF-Application. In this application there is a list of blocks in my drawing. When I click one of these blocks in the listbox I have several button-functions. 

 

One of them:

Select the in the list selected block in the drawing.

 

Another:

Explode the in the list selected block.

 

I found several topics with Selection, but none of them worked for me. I'm looking for a selection via ObjectId or blockname of a single block, in the most cases the selectionfilter needs an array(?). 

And I'm absolutly helpless with block-explosion. Smiley Sad

 

I'm really new to Autocad and C#-Addin-programming. Smiley Indifferent

 

Thank you in advance!

Greets

Klaus

22 REPLIES 22
Message 21 of 23
klahie
in reply to: chiefbraincloud

So Copy+Paste of a blocktablerecord only creates a new instance of this blocktablerecord (called blockreference)?

 

That means if I paste my beautiful traffic sign 3 times, I have one blocktablerecord and 3 blockreferences on it?

 

Uuuh, I hope my examiners don't ask bad questions! Smiley LOL 

 

Greets

Klaus

Message 22 of 23
chiefbraincloud
in reply to: klahie

That is essentially correct.

 

I would say, you are not Copy/Pasting a BlockTableRecord.

 

You start out with a BlockTableRecord, which is essentially data only.  It is not visible on screen, and it is not selectable.

 

You INSERT (Hence the DXF code "INSERT" that you use in the selection filter) a Reference to that BlockTableRecord, Hence BlockReference.

 

Then you copy that BlockReference and Paste more BlockReferences, all of which point to the same BlockTableRecord.

 

If you've only had a short crash course on AutoCAD, then I'm guessing your exam must be programming related not AutoCAD related, right?  In which case I would expect your exam questions to be related more to programming and not AutoCAD.

Dave O.                                                                  Sig-Logos32.png
Message 23 of 23
klahie
in reply to: chiefbraincloud

My examiners don't know anything about AutoCAD, it is the programming part which is important. And because of that, I have to do a lot more exception handling, they understand such things. Smiley Very Happy work for tomorrow... Smiley Wink

 

Thank you for the great support! 

 

Greets

Klaus

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