Project drawing setup plugin

Project drawing setup plugin

jwylie2020
Advocate Advocate
435 Views
3 Replies
Message 1 of 4

Project drawing setup plugin

jwylie2020
Advocate
Advocate

Does anyone have the know how to create a plugin to copy drawing files from a common server folder location to a project specific folder location. The user would check "base" files to be created and plan sheet files to be created. The user would also add a project number to be added to the beginning to each created dwg file. Dwg "template" files would begin with XXXX, the x's would be renamed by the user input. Example: XX-XXXX SITE.dwg to 25-0610 SITE.dwg.

Ideally the user would have a dialog box to input info.

 

It looks like .NET could make a plugin with a dialog box like this. See what attached gemini wrote based on my prompt. This could be a starting point. From what I have read visualstudio code could be used to make a .dll file.

 

Thanks

 

Has anyone done something like this?

JL
C3D 2024
Win 11 Pro
0 Likes
436 Views
3 Replies
Replies (3)
Message 2 of 4

Sea-Haven
Mentor
Mentor

There is no reason as to why it can not be done in lisp, just need a image of the dcl as a dwg, then if your lucky someone will make you a dcl, copying files is a simple task in lisp. You can select a directory to copy and make a destination directory. There are VL commands to do that.

Message 3 of 4

jwylie2020
Advocate
Advocate

So far I got this far: A dialog box opens with available drawings to select and a field to enter a destination path. An OK and Cancel button. After filling out the error shows"; error: bad argument type: stringp nil"
Items to update: Fix the error, ability to select more than one drawing with shift/ctrl or select with checkboxes. Add field to enter project number and rename drawing name Xs with entered project number field.

 

I will work on these item. 

jwylie2020_0-1748355250976.png

 

JL
C3D 2024
Win 11 Pro
0 Likes
Message 4 of 4

paullimapa
Mentor
Mentor

For multiple list box selections add to dcl under your list_box this property

  multiple_select = true

Checkout this thread on how to retrieve the returned value 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-select-multiple-text-in-a-dia...


For destination path you may want to incorporate Lee Macs Browse For Folder:

https://www.lee-mac.com/directorydialog.html


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos