Hi all,
I have written a lisp script to modify the table generated by the cable from/to report. is it possible to modify the autocad script file so that it automatically calls my script after the table is generated?
I'm not sure exactly what you need, but check out the USER POST if you haven't already.
The user post will only work with the data for the report, not the outputted table?
Sorry if my explanation wasn't clear. I have written a script that modifies the table generated by the report. I am hoping to have it automatically run after the table is generated, rather than having to manually call the script every time a create a report table.
Can you modify your lisp to run the report as well and once the report has placed continue your custom formatting?
Maybe one of the report APIs can help.
There is a run script option when you save to file a report but I don't think its available when you choose Put on Drawing option.
https://forums.autodesk.com/t5/autocad-electrical-forum/script-for-reports/td-p/8905453
Another idea could be autorun your formatting every time a drawing is opened. You can do something fancy where you check if a report table exits on a drawing, continue, else exit. Could also do something based on drawing name if the report drawing page names have something in common.
See the acaddoc.lsp for Auto-Running AutoLISP Routines.
https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-FDB4038D-1620-4A56-8824-D37729D42520
Also can you explain what kind of formatting are looking to achieve with your script.
I am wondering if you can do all that before placing the report using the User Post option like @vladop mentioned.
I think using the userpost options will be able to achieve what I am after. I want to insert a blank line every time the cable number changes. So that each group of cable cores is separated by a blank space. Hope that makes sense.
Yep. That should work with User Post.
Yes, give user post a try.
If you are only interested in adding visual distinction when the new cable starts, Breaks might be also of interest to you.
I have got my user post code recognising where there is a change in cable number. What is the easiest way to add a blank line to the report?
Can't find what you're looking for? Ask the community or share your knowledge.