paulvector2 Posted March 7, 2007 Share Posted March 7, 2007 I made a path Pio similar to builtin space tool. Sofar it works fine. But if i want to cut out an hole in my spacepoly with the 2Dreshape tool nothing happens. Any ideas? Quote Link to comment
Petri Posted March 7, 2007 Share Posted March 7, 2007 1. If you define the path with 2DReshape tool so that the edges "to" the hole are visible, you should be OK. 2. If you want to use "Clip Surface" etc. the PIO needs to be "event-enabled". 3. If you want to use the "Objects from Polyline"-command, the SAID COMMAND MUST BE MODIFIED, WHICH MEANS THAT YOUR SPACE-OBJECT CAN'T BE USED BY ANYONE ELSE UNLESS... (Shocking, absolutely shocking. I wonder if even Autodesk has ever resorted to THIS LOW tactics...) Quote Link to comment
paulvector2 Posted March 7, 2007 Author Share Posted March 7, 2007 what means "event-enabled"? Quote Link to comment
Petri Posted March 7, 2007 Share Posted March 7, 2007 It is one of the properties of a PIO. See http://vcor.net/wiki/index.php/Path_obj_with_surface_editing for an example. Quote Link to comment
paulvector2 Posted March 7, 2007 Author Share Posted March 7, 2007 I?m sorry Petri, but I'dont know how to use this code in my PIO. Quote Link to comment
Petri Posted March 7, 2007 Share Posted March 7, 2007 No worries, mate! As far as I know, it only needs to be pasted into a script; certain parts of course must be deleted (eg "RUN"). Beyond this, I can't help because I can't actually make it work! It should, but does not. Quote Link to comment
paulvector2 Posted March 8, 2007 Author Share Posted March 8, 2007 Dear Petri, i modified your space PIO, posted in Vectordepot, "event-enabled", which works fine now. if you want i can post the code here. Quote Link to comment
Petri Posted March 8, 2007 Share Posted March 8, 2007 It does? You're a genius, Paul! Quote Link to comment
paulvector2 Posted March 8, 2007 Author Share Posted March 8, 2007 Here is the code: PROCEDURE Space; { ? Petri Sakkinen 2002 } CONST kObjOnInitXProperties = 5; kResetEventID = 3; kObjXPropSpecialEdit = 3; kDefaultSpecialEdit = 0; kCustomSpecialEdit = 1; kPropertiesSpecialEdit = 2; kReshapeSpecialEdit = 3; kObjXIs2DSurfaceEligible = 14; VAR theEvent, theButton :LONGINT; fID : INTEGER; result :BOOLEAN; objHand, recHand, wallHand, pathHand, dupeHand :HANDLE; objName, spaceArea, spacePerim, spaceGroup, labelText, font :STRING; x, y, x1, y1, x2, y2, rotA, tagA : REAL; PROCEDURE MakeTag; BEGIN IF PTAGSPACENO THEN labelText:=CONCAT(PSPACENO, ' ', CHR(13)); IF PTAGSPACENAME THEN labelText:=CONCAT(labelText, PSPACENAME, CHR(13)) ELSE labelText:=CONCAT(labelText, CHR(13)); IF PTAGSPACEAREA THEN labelText:=CONCAT(labelText, 'A: ', spaceArea, ' m? ', CHR(13)); IF PTAGSPACEPERIM THEN labelText:=CONCAT(labelText, 'U: ', spacePerim, ' m ', CHR(13)); IF PTAGGROUP THEN labelText:=CONCAT(labelText, spaceGroup, CHR(13)); IF PTAGLAYER THEN labelText:=CONCAT(labelText, GETLNAME(GETLAYER(dupeHand))); x:=PCONTROLPOINT01X; y:=PCONTROLPOINT01Y; tagA:= PTAGANGLE; rotA:=GETSYMROT(dupeHand); font:=PFONT; IF NOT(font='Default') THEN BEGIN fID:=GETFONTID(font); TEXTFONT(fID); END; TEXTROTATE(tagA-rotA); NAMECLASS('TAGS'); TEXTJUST(1); TEXTVERTICALALIGN(1); TEXTSIZE(PTEXTSIZE); FILLPAT(0); TEXTORIGIN(x, y); CREATETEXT(labelText); END; BEGIN vsoGetEventInfo(theEvent, theButton); CASE theEvent OF {User has single-clicked the object's icon.} kObjOnInitXProperties: BEGIN {This defines the double-click behavior to active the 2D Reshape tool.} result := SetObjPropCharVS(kObjXPropSpecialEdit, Chr(kReshapeSpecialEdit)); result := SetObjPropVS(kObjXIs2DSurfaceEligible, TRUE); END; {Object reset has been called.} kResetEventID: BEGIN IF GetCustomObjectInfo(objName, objHand, recHand, wallHand) THEN BEGIN pathHand := GetCustomObjectPath(objHand); dupeHand := CreateDuplicateObject(pathHand, objHand); spaceArea:=NUM2STR(2, HAREA(dupeHand)/10000); spacePerim:=NUM2STR(2, HPERIM(dupeHand)/100); MakeTag; END; END; END; END; Run(Space); Quote Link to comment
Petri Posted March 8, 2007 Share Posted March 8, 2007 I object. The credits should mention Charles Chandler and Paul. Besides, the original code is ? someone at NNA... I may have cannibalized & transmogrified it beyond recognition, but that does not make it excusable for me not to have acknowledged the original author. Shame on me! Quote Link to comment
Petri Posted March 8, 2007 Share Posted March 8, 2007 Still trying to recover from the multitude of surprises today... If someone actually wants to use the ancient Space object by various authors, including yours truly, please at least get rid of anything related to font & text size and include SETOBJECTVARIABLEBOOLEAN(objHand, 800, TRUE); in the script to enable standard font definition. Quote Link to comment
Charles Chandler Posted March 11, 2007 Share Posted March 11, 2007 No, I think it's yours, Petri. As I recall (it's been a long time, but...) you wanted us to open-source ours, so you could tweak some things, and we couldn't do that, so you did your own and put it on VectorDepot. There may have been some example code on the VS list, but what I see above is a lot more than example code. So I think it's yours. Quote Link to comment
Petri Posted March 11, 2007 Share Posted March 11, 2007 Sorry, Charles: I just modified an NNA example. It was, I think, some sort of electrical wiring thing. Without the sample, I could never have been able to figure out how to write path objects. Quote Link to comment
gScott Posted March 12, 2007 Share Posted March 12, 2007 paul, what version does that script run under? i get a pile of "Identifier not declared" errors... Quote Link to comment
paulvector2 Posted March 15, 2007 Author Share Posted March 15, 2007 the version is 12.5 Quote Link to comment
Petri Posted March 17, 2007 Share Posted March 17, 2007 *** You are ignoring this user *** Fascinating. Mr. Scott is a truly deep thinker. Quote Link to comment
gScott Posted March 20, 2007 Share Posted March 20, 2007 petri i am actually staggeringly shallow, i always find it's never wise to hold myself out to be any kind of expert or thinker in the murky waters of the web... best wishes, kisses kisses, gideon scott Quote Link to comment
Petri Posted March 20, 2007 Share Posted March 20, 2007 *** You are ignoring this user *** Sorry, I can't hear 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.