CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
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 ClosedAbout custom macro buttons scripts

 Post Reply Post Reply
Author
xikes View Drop Down
Newbie
Newbie


Joined: 25.Jan.2011
Location: Latvia
Using: Autocad2007
Status: Offline
Points: 4
Direct Link To This Post Topic: About custom macro buttons scripts
    Posted: 21.Mar.2011 at 13:13
I have a problem.
Well, basically I've created two buttons with custom scripts - one, that creates and exports layer state of current file, and another one, that imports the layer state saved with the previous button.
Here's the problem. When I open a file and try to export the layer state using my button, it doesn't work. It only works after I open and close the CUI customization window (and only by clicking somewhere on the toolbar and selecting "Customize..."). The weird part is, that I don't have to change anything in CUI settings, I can just click cancel and after the CUI window has closed, my macro buttons work. Why is this? What exactly changed after I opened and closed the CUI customization window? Is there a way to solve this, so it wouldn't be necessary to open the CUI window?
Here's how the comandline window looks in both cases:
Before opening and closing the CUI
http://i126.photobucket.com/albums/p116/xikes/ls_er.jpg
After opening and closing the CUI
http://i126.photobucket.com/albums/p116/xikes/ls_ner.jpg

Here's the script, I used for the buttons:
Export:
^C^C-layer A S layer_state^M EX layer_state;"$M=$(getvar,DWGPREFIX)"layer_state.las""";;;^C^C

Import:
^C^C-layer A I;"$M=$(getvar,DWGPREFIX)"layer_state.las""";R;layer_state;^C^Cchange ALL^M P C BYLAYER;;^C^C

I'm using AutoCad 2007LT.

Note. the last part of the import button simply changes the color of everything to bylayer.
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,148 seconds.