.NET

Reply
Active Contributor
DouceDeux
Posts: 46
Registered: ‎09-04-2012
Message 1 of 2 (208 Views)

Dynamic Block - Programatic creation

208 Views, 1 Replies
12-25-2013 07:57 AM

Hello.

I'm back after a few months of 'vacation' >.<

 

I am currently looking into the creation of dynamic blocks.

I've have not been able to get a hold of the objects that make a block dynamic (parameters, grips, actions)

 

Correct me if I'm wrong but this is how I understand the way the records (objects) are saved.

 

There is a table with records.

One of those records is the Model Space (drawing area). All drawing objects are recorded here.

All layouts have the same hierarchical level as the model space.

All Blocks in the document also have the same hierarchical level as the model space.

 

This would be a representation of the above.

 

-Table

  -Model Space

    -polyline

    -text

    -etc.

  -Paper Space

    -polyline

    -line

  -MyBlock

    -Polyline

    -Text

    -Alignment parameter

    -Alignment grip

 

So, with this in mind I've been trying to study the dynamic blocks so I can create them programatically but when I cycle through the ObjectID's inside my block record (in this case MyBlock) it would only show the Id's for the Polyline and the text and not the other two.

It seems they are recorded elsewhere.

 

Can someone point me in the right direction?

 

I want to access the object and figure out later how it relates to the other objects and make it dynamic.

 

Thanks in advance.

ADN Support Specialist
philippe.leefsma
Posts: 646
Registered: ‎06-02-2009
Message 2 of 2 (130 Views)

Re: Dynamic Block - Programatic creation

12-31-2013 03:59 AM in reply to: DouceDeux

Hi

 

Unfortunately dynamic blocks cannot be created programmatically. Their internal structure is quite a bit more complex than what you mention. If you want to get an idea about what's inside a dynamic block, take a look at the post I'm pointing out below.

 

I doubt you will be able to reproduce and create that on your own. Another tool that is useful to explore the internal structure of a database is provided along with the ObjectARX SDK, it is called ARXDBG (written in C++).

 

http://adndevblog.typepad.com/autocad/2012/05/accessing-visible-entities-in-a-dynamic-block.html

 

I hope it helps,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.