Jump to content
  • 0

Custom Tool/Attribute Scripts


willofmaine

Question

Huh?  I want two versions of the Redline Object created by the Redline Tool: one that is automatically placed in a design-layer-only class, and one that is placed in a sheet-layer-only class (if they're all only in the Notes-Redlines class, sheet layer viewports get cluttered with design layer redline objects).

 

Sadly, things like callouts, revision clouds, and, evidently, redline objects are all super useless when saved as Symbols for future use (I've tried all kinds of combinations of convert-to-group vs. not, world scale vs. page scale (especially with callouts), all to no avail.)  I now see that, in any case, saving those types of objects as Symbols doesn't activate their tools; it just places flawed instances of them in the drawing.  So...

 

I thought I'd try the Custom Tool/Attribute command to create a script that would place a Redline Object with the desired settings in the desired class.  VW Help says "scripts record the current attribute and file settings of a selected object in a script format for later use."  How?  After I create a Redline Object, as I want it and in the class I want, I follow the VW Help steps to create a script.  But when I double-click on the script to run it, at most it will just change the active class (which I don't want).  Otherwise, nothing seems to happen; the Redline Tool isn't activated.  What am I missing??  @Pat Stanford any thoughts?  Thanks!

Link to comment

7 answers to this question

Recommended Posts

  • 0

So I think I got it to work, for a dashed line.  The tool needs to be active, and the line in question selected, when the "Custom Tool/Attribute..." command is run.

 

Oddly, activating the script only activates the Line Tool for the creation of one single line, after which it's necessary to run the script again.

 

But when I use the same approach to create a script for the Redline Tool, the "Tool" option of the "Custom Tool/Attribute..." command is grayed out.  Why???

Link to comment
  • 0

I haven’t tried the custom tool command with redline objects but I know that it doesn’t work on some types of plug-in tool objects. I have created scripts using this command for slabs, walls, simple geometry like lines and rectangles in a variety of classes. 

Link to comment
  • 0

Hi @Boh and @Pat Stanford, thanks for the responses.  "SetTool" worked to make the Line tool remain active, but then the line wasn't drawn in the correct class.  When I removed the Push & Pop Attrs, it was drawn in the correct class but, also, its class was made active.  I was hoping it would put the line in the correct class without changing the active class, as it does for just one instance.  I couldn't see how the script knew what tool it was activating, until I changed the (-201) to a (-202) and got an arc.  I'm guessing there isn't a similar code for the Redline Tool, because as Boh says, it seems like some plug-in object are (inexplicably?) beyond the reach of the custom tool command.  I guess I need to limit my use of the Redline Tool to its strict capabilities...  

Link to comment
  • 0

What you want can't be done from outside of a "basic" tool.

 

You can either use CallTool where the tool is run once wrapped in a script that will temporarily change the attributes, class, etc. and then set them back after the tool has run.

 

Or you can use SetTool whee the script changes the attributes, class etc. and then makes the tool active.  But then it doesn't know when you are done with the tool so can't reasonably set the class and attributes back.

 

More "sophisticated" objects like Door, Windows, etc. allow you to set the class as part of the object so you can use them to put objects into specific classes without changing the active class. And for "some" attributes.

 

HTH explain why you are seeing what you are seeing.

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...