I have two scripts, the first script adds Attribute Definitions to my autoCAD Blocks, to see these changes in AutoCAD I have to run the ATTSYNC command (through Dynamo or manually). In my second script I populate these attribute definitions with the proper data.
I would like to combine these two scripts into one but I can’t get it to work since the syncing then needs to be done in the middle of the Dynamo script, is there a way around this?
Amigo @Daan Buenas. I am not sure if there is already an AttSync Node in dynamo or how to do it through phyton, one WorkArround Alternative will be use the node Document.SendComand of Package Camber, you would need to make a string with all the instructions step by step as if you were doing it manually in autocad (old fashion .scr method) I leave you an example whit a diferent exercise, I hope it helps you!
Yeah this is the setup I have now, I only made this in Python instead of using the Camber Package.
The problem I have lies after the syncing operation, I can’t get it to do the ATTSYNC command, or something similar, mid script.
I have to do a sync like that since the first part of my script adds attribute tags.
Amigo @Daan estas en lo correcto, I had not noticed but it is not very practical to have to do Attsync every time, even without adding new attributes you must do again an attsync so that the attributes are take the correct position and data, if you find a way please share it, an apology for not being able to help you more.!!
It’d be a lift to port over to Dynamo as there isn’t a direct means to run attsync in the API, but I believe this would mimic the command: .NET BLOCK Routines
I see Jacob, thanks for the response.
I’ve read into the code in the link you attached and that seems too complicated for me to figure out. I think keeping the scripts separate is 100 times easier.