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

Custom Objects in Block Reference

5 REPLIES 5
Reply
Message 1 of 6
alexis.nunez98YHM
417 Views, 5 Replies

Custom Objects in Block Reference

alexis.nunez98YHM
Contributor
Contributor

Hello,

 

I was trying to check if possible to create a block with the name AAA. But the output of 2 blockreference is different.

 

Ex.

 

BlockName AAA 

    -- BlockRef 1 Output - 2 Lines Yellow Color

    -- BlockRef 2 Output - 2 Lines Red Color

    -- BlockRef 3 Output - 1 Circle Red Color

 

When I open the blockname it doesn't contain any object. 

 

Is it possible to create in C#?

 

Thanks in advance

0 Likes

Custom Objects in Block Reference

Hello,

 

I was trying to check if possible to create a block with the name AAA. But the output of 2 blockreference is different.

 

Ex.

 

BlockName AAA 

    -- BlockRef 1 Output - 2 Lines Yellow Color

    -- BlockRef 2 Output - 2 Lines Red Color

    -- BlockRef 3 Output - 1 Circle Red Color

 

When I open the blockname it doesn't contain any object. 

 

Is it possible to create in C#?

 

Thanks in advance

Labels (1)
5 REPLIES 5
Message 2 of 6

norman.yuan
Mentor
Mentor

Not very sure "...output..." exactly mean here, but guess you probably mean the block reference visually has 3 looks from the same block definition, right? 

 

Ever heard of dynamic block?  You can easily design a dynamic block, say with 3 Visibility states for this. There is no need to write code (well, straight to your "Is is possible" question, yes, you write code to achieve what you want in a few different ways, if you really do not want simple, Acad built-in solution - dynamic block).

 

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

Not very sure "...output..." exactly mean here, but guess you probably mean the block reference visually has 3 looks from the same block definition, right? 

 

Ever heard of dynamic block?  You can easily design a dynamic block, say with 3 Visibility states for this. There is no need to write code (well, straight to your "Is is possible" question, yes, you write code to achieve what you want in a few different ways, if you really do not want simple, Acad built-in solution - dynamic block).

 

 

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 6

alexis.nunez98YHM
Contributor
Contributor

When I double check the block, its not a dynamic block. When I open the block using the block editor, its only blank. I add line object on that block to check the outcome. Back to the model, all the blocks in the model contains line.

The object was created from another software and I'm trying to understand how it works.

 

 

0 Likes

When I double check the block, its not a dynamic block. When I open the block using the block editor, its only blank. I add line object on that block to check the outcome. Back to the model, all the blocks in the model contains line.

The object was created from another software and I'm trying to understand how it works.

 

 

Message 4 of 6

norman.yuan
Mentor
Mentor

You did not say, in the Block Editor, whether you have seen multiple Visibility states being set or not.

 

BTW, if the block is indeed a dynamic block, there is no API available to create by code.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

You did not say, in the Block Editor, whether you have seen multiple Visibility states being set or not.

 

BTW, if the block is indeed a dynamic block, there is no API available to create by code.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 5 of 6

alexis.nunez98YHM
Contributor
Contributor

In the block editor is like this. Visibility is not set

alexisnunez98YHM_0-1697546396161.png

 

Snoop Output

alexisnunez98YHM_1-1697546914393.pngalexisnunez98YHM_2-1697546959836.png

 

 

0 Likes

In the block editor is like this. Visibility is not set

alexisnunez98YHM_0-1697546396161.png

 

Snoop Output

alexisnunez98YHM_1-1697546914393.pngalexisnunez98YHM_2-1697546959836.png

 

 

Message 6 of 6

alexis.nunez98YHM
Contributor
Contributor

When I click the Dynamic Block Table Record it shows this.

alexisnunez98YHM_4-1697547218071.png

 

But when I clicked the GetErasedBlockReferenceIds and AnonymousBlockIds it became like this.

alexisnunez98YHM_5-1697547322969.png

alexisnunez98YHM_6-1697547333605.png

 

It happens to Clone also.

alexisnunez98YHM_7-1697547391664.png

Ex.

BlockName AAA (No Objects inside the block editor)

    -- BlockRef 1 Output - 2 Lines Yellow Color

    -- BlockRef 2 Output - 2 Lines Red Color

    -- BlockRef 3 Output - 1 Circle Red Color

 

If I going to explode the BlockRef2, the 2 Lines Red Color will be deleted or not visible in the model.

 

0 Likes

When I click the Dynamic Block Table Record it shows this.

alexisnunez98YHM_4-1697547218071.png

 

But when I clicked the GetErasedBlockReferenceIds and AnonymousBlockIds it became like this.

alexisnunez98YHM_5-1697547322969.png

alexisnunez98YHM_6-1697547333605.png

 

It happens to Clone also.

alexisnunez98YHM_7-1697547391664.png

Ex.

BlockName AAA (No Objects inside the block editor)

    -- BlockRef 1 Output - 2 Lines Yellow Color

    -- BlockRef 2 Output - 2 Lines Red Color

    -- BlockRef 3 Output - 1 Circle Red Color

 

If I going to explode the BlockRef2, the 2 Lines Red Color will be deleted or not visible in the model.

 

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report