Block.Import node

I’m finding that the Block.Import node will remove all dynamic block parameters. Anyone else getting the same results with dynamic blocks?

1 Like

Can you post the dyn as well? Helps to ensure we’re all on the same page.

[param-intersect20.dwg|attachment]

Also included the block source drawing in case it has something to do with the block itself.
param-intersect20.dwg (1.2 MB)

2 Likes

You can use latest LinkDWG package (V0.3.5) to have the feature directly copy block from other DWG into current by ObjectDBX.

3 Likes

Does this work in Dynamo for Civil 3D? I have had some issues with the package on that version of Dynamo in the past.

Nearly all fucntions are working in Dynamo for C3D. Just make sure C3D 2020 is the only AutoCAD-based applciation is running.

Thanks. This works. I’ll mark this as the solution. However, Autodesk should fix the build-in Block.Import node.

1 Like

I flagged this post with the Civil 3D development team the day you posted it. No word back yet, thought it has only been one business day.

1 Like

I am looking to insert a block into over 5,000 drawings. Does anyone know how to grab a whole folder and insert it into all dwg’s in that folder? I have a script that erases a block and inserts a new one that I am happy to share, but not sure how to get a whole folder. I have ‘Get content in folder’ script but its looking for a Forge folder.

Koz, This works good for grabbing it, but then do you hook it into Blockreferencecreate or Insertbyname? Both of those say it is a string and needs to be a block node. @ko

I am not sure what you are trying to archieve, but since you can copy block from external DWG into current document, you can then just use the blockname to represent the data and insert the blocks. All relared nodes can also be found in LinkDWG2, please refer to picture.QQ截图20200814163444

For what you want to do, you can directly using ODBX to open the DWG one by one in background and copy block into ODBX document (Reverse operation of copy block from ODBX document) and then save the DWG.
To Get all DWGs in a folder, can simply use “os.walk” to grab them.

The task is not difficult but need some python coding.

2 Likes