TiTaNiuM sAMuRai Posted June 18, 2002 Share Posted June 18, 2002 Whenever I go to the Create Plug-ins dialog, all the PIO's that I have (custom-made) reset themselves to the ACTIVE layer only. When I switch to another layer (different scale, so the PIO's are incorrectly scaled), moving the PIO doesn't fix it, but rotating does. Reset on Move is checked, as is Reset on Rotate. The regen check is as follows: {"error-check for possible size changes in regens"} if IsNewCustomObject (this_object_name) or (GetLayer(this_object_handle)=NIL) { what does this check mean? } then LayerScale:=GetLScale(ActLayer) { set the scale var to the current doc scale } else LayerScale:=GetLScale(GetLayer(this_object_handle)); { retrieve scale of object's layer } It's as though the GetLayer doesn't work correctly during a global PIO update. I originally grabbed the above check from a v8 Elevation Benchmark script. Can anyone help? Until then, I'll try to check if the placement of the code (and assignment to LayerScale) is the culprit. Quote Link to comment
TiTaNiuM sAMuRai Posted June 18, 2002 Author Share Posted June 18, 2002 Sorry. It's only the text of the PIO's that's messed up. TextSize(TagFontSize); {12 pt; INEED2 set the unit to 'points' instead of mm or inches} TagFontSize is a CONST ( =10; ) Is there a more thorough way of specifying the text size? Should I set a metric SIZE for the text, and then scale up that value? Quote Link to comment
Alexandre Villares Posted June 19, 2002 Share Posted June 19, 2002 OK, the trick is, add this to your plug-in: ALHand:=ActLayer; IF GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand) THEN BEGIN IF GetLayer(objectHand)<>NIL THEN BEGIN Layer(GetLName(GetLayer(objectHand))); END; END; [... your plug-in goes here...] Layer(GetLName(ALHand)); The point is: have the layer made active at the time the plug-in is redrawn. Quote Link to comment
TiTaNiuM sAMuRai Posted June 21, 2002 Author Share Posted June 21, 2002 Excellent, Watson. Brilliant, yet wonderfully simplistic! Thank you. Quote Link to comment
Recommended Posts
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.