; error: bad argument type: consp "*A1"
is the error I get when I run the program. Also you have a call for a
GetDictKeyVals command, but I changed it to GetDictKeys to match the defun in the program
|
; error: bad argument type: consp "*A1"
is the error I get when I run the program. Also you have a call for a
GetDictKeyVals command, but I changed it to GetDictKeys to match the defun in the program
Last edited by Opie; 2008-02-18 at 06:29 PM. Reason: Removed code
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
after I ran the code, I found that it is something similar to what I already have, it changes the name in the annotation scale of the 1:1 scale to 1:40, giving me 2 1:40 scales, this messes something else up, I just cant remember what it was. I think that the scaled objects still do not show properly.
Disregard that last code. You are correct in that it renames the scale of the original annotation scale to a new name.
I have discovered that each scale has it's own entity name. I just have not discovered how to make the viewport be associated with that new scale. The original routine is the only way that I have found to make it work.
I'll keep working on it as I have time.
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
The annotation scale of a viewport seems to only be possible to change while inside the viewport, by setting CANNOSCALE. I've tried modifying the Extension Dictionary which links the viewport to the Scale object - but it simply doesn't have any effect.
So finally I've just made a lisp to go into each viewport selected and set its CANNOSCALE to that matching the viewport's zoom factor (as close as possible). Commands are MatchVPScale & MatchAllVPScale.
I'll give that a shot and see if it works for my situation, It's been a while but I believe I was hoping to run it from a reactor, or within another program.
From my code you could try to call the helper function SetVPAnnoScale by passing it the ename of the viewport entity and the zoom ratio (which you can get using the CustomScale property or use my helper func GetVPScale with a normal ename as parameter). Otherwise just call the MatchVPScale command & select the relevant VP through VBA.
I know it's been a while, but I was going through my subscribed threads and noticed that I havent responded to this one.
Can I just have your program run on all the viewports in the current drawing? the goal is that when we run our clean up routine after a sheet is created by our 3rd party software, that the 2 viewports created get an annotation scale set to match the scale of the viewport.
Sure that's what the MatchAllVPScale command is for, it matches the CANNOSCALE to the VPScale for all viewports on all layouts in the current drawing. If you want to call it from a reactor, (c:MatchAllVPScale). Just be careful what reaction to place it under, so you don't end up with the routine causing the reaction again & thus causing an infinite loop. If this happens, maybe add a global state variable, set it to T just before calling the (c:MatchAllVPScale) then set it back to nil just after. Only run the routine if it's not set to T. Something likeCode:(if (not alreadyrunning) (progn (setq alreadyrunning T) (c:MatchAllVPScale) (setq alreadyrunning nil) ) )
that seems to have gotten the job done, I just attached it to our clean up file, so when it is run, the scales are matched.