Delete import CAD layers

Hi,
how is it possible to delete a line/import cad layers in dynamo by its name.
Like, I want to delete the line “Line1”

Other questions, is it possible to explote a import CAD with dynamo?

Regarding the first question:

Please start a new topic for the second question.

thanks! it helps, but what I wanted to do is to delete the object who has a specific name… Do you know what I mean? Like, I want to delete every line with “Line1” as name, in the projet. If I delete only the name/layer, Revit replace the object line style by a default one.

@YRioux you need just to filter the lines that contain Line1 and you you can use a string.contains node instead.
Not at the PC at the moment. Try if you can figure it out or I’ll post something later

@YRioux Change the code block to

DSCore.List.Clean
(
DSCore.String.Contains(elem.Name, name, false)==true
? elem
: null,
false
);
1 Like

@YRioux got you!.

Try this

DSCore.List.Clean
(
DSCore.String.Contains(LineTpe, name, false)==true
? elem
: null,
false
);
2 Likes

Thanks! That’s exactly what I’ve been looking for.

1 Like