Objects Types with AutoCAD Points as a Selection

Looking for a Node that will select all AutoCAD Points in a drawing. This “Objects Types” doesn’t have AutoCAD Points in its list.

1 Like

Hi @hosneyalaa,
Thank you, but I don’t get anything different. How do you “wire” the DocumentExtensions.AddNewTypes Node?
Dave

1 Like

@hosneyalaa,
OK, I see it now. I clicked “Run” and it appeared. Thank you.
But geez, I gotta say, how would anyone know that without being told about it?
Dave

@hosneyalaa,
Now you’re confusing me. Why would I “X” out Document.ModelSpace?
Dave

Forum in order to help everyone

Through practice, training and forum follow-up

You learn something new every day

2 Likes

You’d still want to keep that when it comes to the selection part probably using select all of type mode. You’re probably familiar with this post doing same select all autocad points Cogo points from AutoCAD points & OD - #2 by mzjensen
Yeah that add new types node is a bit tricky, I’ve learned about it’s quirks through AU classes and other youtubes I think, and is mentioned in the form from time to time.

1 Like

Hi Kirk,
OK, so I guess I had seen that DocumentExtensions.AddNewTypes before. It just didn’t register with me because Zachri had that Node sitting all by its lonesome, not wired to anything. I still don’t understand how a Node can do something without being connected to another Node.
Dave

This gets into some technical programming stuff, but imagine that behind the scenes every node is basically a function (aka a “method” in object-oriented programming terms). They usually take some input data, do something with it, and then return an output. It’s also possible to have a method that executes code but doesn’t require any input. And it’s also possible to have a method that executes code but doesn’t return anything (called a “void” method).

So in this particular case, the backend for Dynamo for Civil 3D has a collection of “object descriptors” that populate that dropdown node of object types. Also on the backend, there is a method to add to the list of object descriptors, and so Paolo (the creator of the Civil 3D Toolkit package) created the DocumentExtensions.AddNewTypes node that essentially does that. It doesn’t require any input (it’s just adding new object descriptors) and it also doesn’t explicitly return anything (the result is a modified list).

You probably wouldn’t. Dynamo for Civil 3D is still in a growing stage, and even though many solutions on the forum utilize the Civil 3D Toolkit package, it’s important to remember that it’s basically an add-on/extension. Most users rely upon it at this point, but it isn’t part of the OOTB installation. It’s akin to downloading a plugin from the Autodesk App Store. A little more discussion here.

2 Likes

Thanks Zachri. That helps.
Dave