ScriptPro or AutoScript for 2016 and up?

ScriptPro or AutoScript for 2016 and up?

Anonymous
Not applicable
9,303 Views
18 Replies
Message 1 of 19

ScriptPro or AutoScript for 2016 and up?

Anonymous
Not applicable

After yet another venture into the black hole that we call the "autodesk website" I have no paitence for what they term "customer service."  Isnt anyone else sick of this?  The website is horribly organized, slow, and impossible to navigate.  Ive never seen worse... but anyways...

 

What happened to ScriptPro?  All i can find access to is 2.0 which wont install on my comuter because it cant get access to a file for some reason.  (yes, i have administrator rights) Does anyone have a link to something current that works on 64bit computers?

 

The AutoScript links i can find only install .arx and .cuix files with no .exe file to run any sort of program.  How is someone supposed to write script to customize ACAD with pieces and parts? 

 

Need some direction on this.  Is Autodesk getting rid of this capability?

 

Also, there are very few educational posts on the topic of writing lisp routines.  Really feeling left in the cold, Autodesk...

9,304 Views
18 Replies
Replies (18)
Message 2 of 19

David_W_Koch
Mentor
Mentor

There used to be a 64-bit version available via Autodesk Labs, as linked to by Shaan Hurley in this blog article.  That download does not appear to be there anymore, however.  There is another thread in which someone claims that this download will work on a 64-bit computer:  http://images.autodesk.com/adsk/files/scriptpro.exe  

 

I have not tested it myself.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

0 Likes
Message 3 of 19

Anonymous
Not applicable

Thanks.  That didnt seem to be compatible with my OS.  But the more I look into this, there is no application to help write script... only run script.  Correct?

0 Likes
Message 4 of 19

David_W_Koch
Mentor
Mentor

ScriptPro is meant to make running a script on multiple files easier.  It does not make writing the script itself easier.  I am not aware of any programs, tailored to AutoCAD, that do that, but perhaps there are one or more third-party programs that do so.

 

If you know what to type at the command line to accomplish the task at hand, you can write an AutoCAD script.  There are some fine points to work through (commands that open dialogs either will not work, or will run a non-dialog version, for example).


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

0 Likes
Message 5 of 19

Anonymous
Not applicable

OK, thanks.  Thats what i was thinking.  Looks like the only tutorial help is what i can find through the interweb.  What I'm trying to do is set up a simple layer on/off control using custom fields in the SSM.  As an example:

 

(DEFUN C:SEAL () ;define a new command "seal" used to initiate the layer control.

    (SETVAR "CMDECHO" 0)

    (SETQ NWGSEAL ("%<\AcSm SheetSet.DCSSEAL \f "%tc1">%")) ;the autocad attribute code for the field.  This is my hangup currently.

    (SETQ DCSSEAL ("%<\AcSm SheetSet.NWGSEAL \f "%tc1">%")) ;the autocad attribute code for the field.  This is my hangup currently.
    
    (COND ((DCSSEAL=1) COMMAND ".LAYER" "ON" "*-DCS" "")) ;layer condition control.  would an "IF" statement be a better way to handle this?

    (COND ((DCSSEAL 0) COMMAND ".LAYER" "OFF" "*-DCS" "")) ;same

    (COND ((NWGSEAL 1) COMMAND ".LAYER" "ON" "*-NWG" "")) ;same

    (COND ((NWGSEAL 0) COMMAND ".LAYER" "OFF" "*-NWG" "")) ;same

    (SETVAR "CMDECHO" 1) ; not sure if i even need to turn this on/off for the command but time will tell

    (COMMAND "QSAVE" "")

(PRINC)

)

 

 

Eventually if i get the above to work, i'll automate it somehow across all sheets in the sheetset.  Thats the goal anyways.

0 Likes
Message 6 of 19

Anonymous
Not applicable
(defun c: seal () is the first line actually...
0 Likes
Message 7 of 19

David_W_Koch
Mentor
Mentor

I have no experience with trying to extract property values from a sheet set, so I will not be much help there.  If you can work out how to do that, the following comments may be useful in the other parts of your AutoLISP function.

 

CMDECHO is an AutoCAD system variable that controls whether or not the command line prompts of command issued via the AutoLISP command function are echoed to the command line.  If it is set to 1, they are; if it is set to 0, they are not.  Depending upon you application, one or the other setting may be preferred.  Usually, turning it off makes for less chatter on the command line.  (Turning it on while debugging a function can be helpful, however.)  So setting it to 0 before your routine gets to the point where you will be using the command function is a good idea.  I generally like my routines to leave things as they were when the routine started, so I will usually save the current value of the CMDECHO system variable first, in a local variable, and then restore it at the end.

 

(defun c:test01 ( / acmde)
   (setq acmde (getvar "CMDECHO"))
   (setvar "CMDECHO" 0)
   ....
   (setvar "CMDECHO" acmde)
   (prin1)
) ;_ End c:test01.

The "...." is the rest of your program.  Any variable names included after a forward slash in the pair of parantheses that follow the defun name are treated as local variables, and will not be "remembered" after the routine is completed.

 

Your cond functions are not formatted properly.  You are missing parentheses around the command functions and arguments.  While you could use four separate cond functions, with one action each here, and get what I assume is your desired result (if you are able to get the values from the sheet set, a cond function is more typically used when there are multiple, mutually exclusive options, only one of which is to be executed.  I assume that NWGSEAL and DCSSEAL are independent, and could both be 0, both be 1, or either could be 1 and the other 0.  Since each only has two values, I would probably use if functions:

(if (= DCSSEAL 0) 
 (COMMAND ".LAYER" "OFF" "*-DCS" "")
 (COMMAND ".LAYER" "ON" "*-DCS" "")
) ;_ End if.

(if (= NWGSEAL 0) 
 (COMMAND ".LAYER" "OFF" "*-NWG" "")
 (COMMAND ".LAYER" "ON" "*-NWG" "")
) ;_ End if.

You could use cond functions, but would only need two:

(cond 
   ((= DCSSEAL 0)
    (COMMAND ".LAYER" "OFF" "*-DCS" "")
   ) ;_ End condition 1.
   ((= DCSSEAL 1)
    (COMMAND ".LAYER" "ON" "*-DCS" "")
   ) ;_ End condition 2.
   (T
    (prompt "\nInvalid value assigned to variable DCSSEAL. ")
   ) ;_ End condition 3.
) ;_ End cond.

(cond 
   ((= NWGSEAL 0)
    (COMMAND ".LAYER" "OFF" "*-NWG" "")
   ) ;_ End condition 1.
   ((= NWGSEAL 1)
    (COMMAND ".LAYER" "ON" "*-NWG" "")
   ) ;_ End condition 2.
   (T
    (prompt "\nInvalid value assigned to variable NWGSEAL. ")
   ) ;_ End condition 3.
) ;_ End cond.

Hope that helps, and good luck with finding out how to get the field data out of the Sheet Set Manager using AutoLISP.

 


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

0 Likes
Message 8 of 19

Anonymous
Not applicable

it does!  thank you!

0 Likes
Message 9 of 19

Anonymous
Not applicable

I tried to install it with no luck.

it appears that that version is not compatible with 64bits

0 Likes
Message 10 of 19

kadeking
Advocate
Advocate

I would suggest using Autoscript.

 

http://www.cadig.com/products/autocad-script-pro.php

 

Best regards,
KaDe King

Message 11 of 19

Anonymous
Not applicable

If you still find a need you could use our Multi-Batch program to run your lisp routine. It also has 5 wizards for creating routines 2 of which create plot routines for full version AutoCAD and LT.

 

There is a free demo which has these wizards plus over 60 other script routines which you can alter for your own needs.

 

Patrick

http://www.multi-batch.com/

For your entire batch processing needs

Message 12 of 19

mc5fan
Advocate
Advocate

I cannot get Autoscript 3.4 to run in AutoCAD 2018. Autoscript 3.4 is the latest addition. It ran fine in AutoCAD 2017. AutoCAD 2018 is what I have now and it IS a new (upgraded?) AutoCAD format.

 

The screen shot is of my Cadig\Autoscript directory with the various .arx files. I am believing that AutoCAD 2018 will need a new .arx file to be compatible with my newer release of Autocad. Is this a good deduction???

Lee M.
0 Likes
Message 13 of 19

pendean
Community Legend
Community Legend
Did you ask Cadig, the author, for assistance? Only they can provide you with a fix, you cannot as an end user.
0 Likes
Message 14 of 19

mc5fan
Advocate
Advocate

I have attempted contact many times but I have not got a response from them.

Lee M.
0 Likes
Message 15 of 19

pendean
Community Legend
Community Legend
Only the author can help you, they wrote and own the code.
0 Likes
Message 16 of 19

kadeking
Advocate
Advocate

Hi,

 

I actually just ran a reinstall of Autoscript 3.4 on my system and it installed on AutoCAD 2018 and is working. I just tested it on several files.

 

I did have to reinstall it though. So you might want to try that.

 

Best regards,
KaDe King

U.S. CAD

KaDe.King@uscad.com

Message 17 of 19

Anonymous
Not applicable

Hi, 

 

 

             Thanks for sharing this coding snippets.

0 Likes
Message 18 of 19

mc5fan
Advocate
Advocate

Yes, an updated version is available at:   http://cadig.com/download/

 

It looks just like the old version on the description page:   http://cadig.com/products/autocad-script-pro.php

 

That may have deterred me from liking there in the 1st place. My error!

 

Lee M.

Lee M.
0 Likes
Message 19 of 19

Anonymous
Not applicable

just use 7zip to extract the content of the msi. Only the installer is too stupid. Noone needs that thing.

There is a folder inside which holds all you may need.

0 Likes