I want to export the dynamic sign blocks and their rotation and post number and/or frame type into an SDF/shape file for use in Infraworks.
I have spent hours looking at it and I just cannot figure out what is going on, the blocks have different x scales, some negative and some positive, they also have two rotations, the rotation of the block (as a whole) and the rotation of the sign face to help in the confusion when I get the dynamic block properties I get a completely different rotation. Example Dwg Sign Blocks.dwg (2.5 MB)
I thought I would be able to read the information within the dynamic blocks, export an SDF then map the matching pieces of information together based on the same x/y/z but cannot work out how. (Apologies for the state of the graph; I seem to be a shotgun guy where I throw everything down and see what sticks.) I hope it shows I have at least tried.
Thanks @hosneyalaa; I have read that post, but maybe i forgot to try it I’ll have another look. Is there a reliable option with out of the box nodes? I only ask this as my company has blocked Python in previous graphs I have tried to run it in.
Hi, I am unable to use the python script on that page, when I do i get an “unhandled exception error” which results in a crash of dynamo and my C3D session.
Next question is how do I filter the dynamic block based on their visibility state. The block in question has 6 states, each of those states has a rotation parameter, single post is single, double post is double etc in order to extract the correct rotation i need to be able to match which rotation parameter I use. The only way I can think of doing this is with a nested if statement like:
So something like if signs (the visibility state) = single post then use single (rotation parameter) if signs - double post then use double etc.
I expect it is possible with python and loops (?) but i dont know python well enough to create the code.
The problem I am experiencing is with the scale of the block being in negative, so when the vector is being ready the rotation it is supplying is incorrect. I tried to change just the vector that I believe is causing the problem into a postive (through converting to string, filtering, getting index replacing then converting back into a vector) but this also doesnt seem to work when read in conjunction with the other axis vectors. I am at a bit of a loss if I am honest.
The other thing that is confusing me is that the rotation angle read when using the list “list” command in CAD is not the same as the rotation angle defined in the properties box, something I have never previously noticed, which makes me wonder which angle should be read/correlated when reading the information in Dynamo.
My company blocks Python running so need to be able to do it with OOTB nodes. I also don’t know how to write Python; i am learning but am not at the level required to write it. I have a working script for all blocks that are not negatively scaled.
Thanks @hosneyalaa. I guess I should have been clearer, it isn’t the sign faces I am after but the sign posts, these are the dynamic blocks that denote the type of sign and rotation of the plate. The ones that have a positive scale I can get the information for but the ones that are negative are where the rotation is wrong.