CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.099.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator and the updated Barcode generator. New AutoCAD 2026 commands and variables.
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedScript writing advice needed

 Post Reply Post Reply Page  123>
Author
tieniemaree View Drop Down
Newbie
Newbie


Joined: 22.Sep.2015
Location: South Africa
Using: AutoCAD Lt 2016
Status: Offline
Points: 15
Direct Link To This Post Topic: Script writing advice needed
    Posted: 29.Sep.2015 at 16:59
ah ok, thanks mate.
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 29.Sep.2015 at 16:49
I'll concede the point re Overkill.

If I missed the dash I apologize.  Regapps are Registered Applications.  Like anything else that is not being referenced (ex. - blocks) when one purges a drawing you want to clean those out.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
tieniemaree View Drop Down
Newbie
Newbie


Joined: 22.Sep.2015
Location: South Africa
Using: AutoCAD Lt 2016
Status: Offline
Points: 15
Direct Link To This Post Posted: 29.Sep.2015 at 16:30
@John

thanks for your feedback. Overkill is not needed as we oftentimes deliberately have multiple lines on different layers on top of each other, and Overkill will get rid of these IMO.

I did punt a dash in so I don't know what you are implying.

Purge could possibly have to run in some drawings yes, but not always. I am happy to run it once.

the REGEN is possibly also redundant yes.

all in all the script works fine for what I wanted to achieve. what would you change then if I may ask? and why?
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 29.Sep.2015 at 16:24
Still needs work.

First you run Overkill to get rid of any duplicate or overlapping lines.

Second you do a -Purge (note the dash?) of Regapps.

Third you do -Purge > All.

Fourth, and finally, you do an Audit.

Why the Regen at the end?  What is that supposed to accomplish?
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
tieniemaree View Drop Down
Newbie
Newbie


Joined: 22.Sep.2015
Location: South Africa
Using: AutoCAD Lt 2016
Status: Offline
Points: 15
Direct Link To This Post Posted: 29.Sep.2015 at 16:21
MODEL

AUDIT
Y


-PURGE
A
N
N


-LAYER
UNLOCK
*

_FILEDIA
0


EXPERT
3


-LINETYPE
L
PDASH2SPACE,PDASHED,PDASHED2,PDASHEDX2,PCENTRE,PCENTRE2,PPHANTOM,

PPHANTOM2
"C:/MK AUTOCAD FILES/acadlt.lin"

EXPERT
0


_FILEDIA
1


_AI_SELALL
CHPROP
S
1

PSLTSCALE
1


MSLTSCALE
1


LTSCALE
1


CELTSCALE
1


CANNOSCALE
1:100


ZOOM
EXTENTS
REGEN
SAVE






AND NOW?
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 29.Sep.2015 at 16:12
Your Purge > All is not thorough enough, you don't run Overkill and you don't run Audit.  Why?  You obviously want to do some clean up of your drawing but all you are doing is shaking out the rugs without dusting, mopping and vacuuming.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
tieniemaree View Drop Down
Newbie
Newbie


Joined: 22.Sep.2015
Location: South Africa
Using: AutoCAD Lt 2016
Status: Offline
Points: 15
Direct Link To This Post Posted: 29.Sep.2015 at 14:55
must be said, local CAD guys did eventually provide the last piece of the puzzle.
Back to Top
tieniemaree View Drop Down
Newbie
Newbie


Joined: 22.Sep.2015
Location: South Africa
Using: AutoCAD Lt 2016
Status: Offline
Points: 15
Direct Link To This Post Posted: 29.Sep.2015 at 14:54
HERE IT IS!!!!

MODEL

-PURGE
A
N

-LAYER
UNLOCK
*

_FILEDIA
0


EXPERT
3


-LINETYPE
L
PDASH2SPACE,PDASHED,PDASHED2,PDASHEDX2,PCENTRE,PCENTRE2,PPHANTOM,PPHANTOM2
"C:/MK AUTOCAD FILES/acadlt.lin"

EXPERT
0


_FILEDIA
1


_AI_SELALL
CHPROP
S
1

PSLTSCALE
1


MSLTSCALE
1


LTSCALE
1


CELTSCALE
1


CANNOSCALE
1:100


ZOOM
EXTENTS
REGEN
SAVE
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 28.Sep.2015 at 15:18
Wouldn't you use the SETVAR command, variable name then either a 0 or 1?
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
tieniemaree View Drop Down
Newbie
Newbie


Joined: 22.Sep.2015
Location: South Africa
Using: AutoCAD Lt 2016
Status: Offline
Points: 15
Direct Link To This Post Posted: 28.Sep.2015 at 14:04
@john

how do you deal with yes/no variables in scripts?
Back to Top

Related CAD tips:


 Post Reply Post Reply Page  123>
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,086 seconds.