Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Drawing variable & Block in ToolPalettes

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
joh.richard
473 Views, 11 Replies

Drawing variable & Block in ToolPalettes

Hi,


I just made the transition from AutoCAD 2009 to 2014 last week so I am unfamiliar with this version.

 

1-It's possible to have variables that are attached to the file?

2-It's possible to insert a block of ToolPalettes by "forcing" the layer and size with the variables created.

    

ex :  block outlet created on the layer 0

Drawing A:
variable layer = power
variable size = 1/4

When I insert the block outlet from my Tool palettes it will be on the layer "PPOW" and perform a scale of "48"

Drawing B:
variable layer = LowPower
variable size = 3/8

When I insert the block outlet from my Tool palettes it will be on the layer"LPOW" and perform a scale of "32"


Thanks for your help

Johanne

11 REPLIES 11
Message 2 of 12
rkmcswain
in reply to: joh.richard

1. The USERI* and USERR* user defined system variables are stored in the drawing. Is this what you are talking about?

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 12
pendean
in reply to: joh.richard

FYI, nothing much has changed in core features like TPs: so how did you do this in 2009?

1. Explain more, what is it you want to achieve?
2. right-click on any item in a TP, like you did in 2009, select Properties, and explore the options (yes you may need to stretch the pop-up to see all three categories and their listings). Note that in order for any block to follow your "scale" it need to be an annotative block first. Just like in 2009.
Message 4 of 12
dbroad
in reply to: joh.richard

What I understand you to want is a way that the tool palette system can operate differently based on drawing resident variables.

 

Without programming customization what you want  is not possible.

 

The tool palette system is designed for consistency, not variability.  Whatever the tool properties are set to, will be used when content is inserted.  AutoCAD verticals have an alternate content path that uses the design center and can accept command macros which could do what you want along with the insertion.

 

You could also set up reactors for rule based behaviors (possibly tracking the "EXECUTETOOL" command).  The payback for such investment though is questionable.

Architect, Registered NC, VA, SC, & GA.
Message 5 of 12
joh.richard
in reply to: rkmcswain

Thanks for the information

 

But the variable Users1-5 are not saved in the drawing.

 

 

Message 6 of 12
joh.richard
in reply to: pendean

An experienced user had performed routines for automated insertion block. Unfortunately, the user no longer work with us (disease)  and a good part of the routine is ARX. I'm not having the source code so I can not modify these routines.
Currently I edit the block properties manually or made matchprop.
This slowed work and creates ,sometime, mistakes.

 

Thanks for the tips!

Message 7 of 12
joh.richard
in reply to: dbroad

Exactly.


Not being familiar with the programming, I looked for a option without a programming.
I will read the forum "programming" to inspire me. Not knowing any of the .VB. I'll probably try my hand with the lisp and design center

 

Thank you for taking the time guided beginner like me!

Message 8 of 12
dbroad
in reply to: joh.richard

You're welcome.  Glad to help.

 

If you want to play around to see the possibilities of reactors, copy/paste this to your command line and see the interactivity. Enter the command "stop" when your done.

 

(if myreact (vlr-remove myreact))

(setq myreact (vlr-command-reactor '("EXECUTETOOL")'((:vlr-commandended . tpannounce))))

(defun tpannounce (r cl)

(if (member (car cl) (vlr-data r))(alert "Tool palette activity")))

 

(defun c:stop()(vlr-remove myreact)(setq myreact nil)(princ))

Architect, Registered NC, VA, SC, & GA.
Message 9 of 12
rkmcswain
in reply to: joh.richard


joh.richard wrote:

But the variable Users1-5 are not saved in the drawing.

 


Correct. I was directly answering the question "It's possible to have variables that are attached to the file?"  For integers and reals, yes. Strings, no.

R.K. McSwain     | CADpanacea | on twitter
Message 10 of 12
dmfrazier
in reply to: rkmcswain

"Strings, no."

 

I was just about to "challenge" you on that point, but it appears to be true!

 

Can you explain why the "USERSn" vars are not saved?

Message 11 of 12
rkmcswain
in reply to: dmfrazier

Your guess is as good as mine.
R.K. McSwain     | CADpanacea | on twitter
Message 12 of 12
dmfrazier
in reply to: rkmcswain

Oh, no... yours are usually (much) better.Smiley Wink

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost