Pulling Visibility State of each from Block.dwg using GetCOMObjects

Hello Everyone,

I’ve gone as far as I can skimming the forums…

Currently, I have a script that will:

  • check the current family (because this is meant to run in a batch using Bird Tools)
  • Read a .dwg (a saved out block) from a directory comparing the family name in excel
  • Focus all of the COM Lines, Arcs, Circles, Ellipses, Poly/Spline
  • Brings all of that into Dynamo as geometry
  • Splits the PolyCurves
  • Writes that linework into the Revit family

It works perfect! Except when it is a Dynamic Block with Visibility States! When the block has Visibility States the script logically draws ALL of the lines. Since the block is not placed, I believe it can read all lines from the Block Editor.

I will attach and be showing a trimmed down version of the script that should get to the same place much faster than running the full thing. I will also attach the example block. Any family should be enough to run the script in this limited state.

What I’m considering is using the technique I used to sort the linework by colour. GetPropertyValueByName asking for some Property called Visibility1 or Visibility State. BUT I don’t know what this property is called or if it even exists.

If anyone knows their way around the LinkDWG/AutoCAD well and can help it would be very appreciated. Perhaps the only way to accomplish this would be custom Python which I know very little about.

Supposedly, I can not upload attachments because I am a new user…

Bump :frowning: