
kiwi
Member-
Posts
104 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Everything posted by kiwi
-
Yep! I try on XP and the dialog came empty??? I will try to identify the procedure that have a problem with XP and let you know. Cheers.
-
Hi Brendan, Witch software/OS are you using?
-
I forget the {$debug} on the line 7: remove it before run the script!
-
Try that, I don't have run a good trial of it, but he seems to work OK... but I don't guaranty anything. You are able to send object to other layers or classes, and choose if you want to apply the new class attributes. By "Follow" I mean that you will end up on the layer and class you have selected: Is easy to see if on the options you select "see only". I'm using different versions set up as a right click (as a plug in), and so far he don't seem to have bugs: but let me know, and I will try to fix them. code: {/////////////////////////////////////////////////////////////// LayerClassT By: <kiwi Dec 2003> Built with Dialog Builder 4 © 2001 Nemetschek North America. ///////////////////////////////////////////////////////////////} PROCEDURE LayerClassT; {$debug} VAR dlogID,dlogResult,nl,nc,i : INTEGER; dialogIsOK,rsrcOK,dupl,go,dumm,OK : BOOLEAN; h,ho: HANDLE; Layerr,classr,currentL,currentC,clas: STRING; Layers,Classes: DYNARRAY OF STRING; Attb: ARRAY [1..5] OF BOOLEAN; { dialog related subroutines } { Dialog definition function subroutine } FUNCTION Define_LayerClassT : INTEGER; VAR dialogID : INTEGER; BEGIN dialogID := CreateLayout('Layer/Class Transfer',True,'OK','Cancel'); CreatePulldownMenu(dialogID,10,25); CreatePulldownMenu(dialogID,20,25); CreateGroupBox(dialogID,50,'Class Attributes Options',True); CreateCheckBox(dialogID,30,'Follow objects'); CreateCheckBox(dialogID,40,'duplicate objects'); CreateCheckBox(dialogID,51,'Fill Collor by Class'); CreateCheckBox(dialogID,52,'Fill Patern by Class'); CreateCheckBox(dialogID,53,'Pen Color by Class'); CreateCheckBox(dialogID,54,'Pen Weight by Class'); CreateCheckBox(dialogID,55,'Line Style by Class'); CreateCheckBox(dialogID,56,'All Attributes'); SetFirstLayoutItem(dialogID,10); SetBelowItem(dialogID,10,20,0,0); SetBelowItem(dialogID,20,30,0,0); SetBelowItem(dialogID,30,40,0,0); SetBelowItem(dialogID,40,50,0,0); SetBelowItem(dialogID,50,56,0,0); SetFirstGroupItem(dialogID,50,51); SetBelowItem(dialogID,51,52,0,0); SetBelowItem(dialogID,52,53,0,0); SetBelowItem(dialogID,53,54,0,0); SetBelowItem(dialogID,54,55,0,0); SetHelpString(1,'Accepts dialog data.'); SetHelpString(2,'Cancels operation without changes.'); SetHelpString(10,'Slect a layer to transfer your selected object'); SetHelpString(20,'Select the class you want your object transfer to.'); SetHelpString(30,'Go to the selected option with the actual visibility settings'); SetHelpString(40,'Select to duplicate your selected object'); Define_LayerClassT := dialogID; END; { get Layer names to dinarray Layers } Procedure GetLayers; BEGIN nl:=NumLayers; AlLOCATE Layers[1..nl]; h:=FLayer; For i:=1 TO nl DO BEGIN Layers:=GetLNAME(h); h:=NextLAyer(h); END; END; { get Class names to dinarray Classes } Procedure GetClasses; BEGIN nc:=ClassNum; AlLOCATE Classes[1..nc]; For i:=1 TO nc DO BEGIN Classes:=ClassList(i); END; END; { Change each obj settings } Procedure ChangeObject(ho:HANDLE); VAR Fp,Ls,Lw: INTEGER; Pcr,Pcg,Pcb,Ffr,Ffg,Ffb: LONGINT; BEGIN GetPenFore(ho,Pcr,Pcg,Pcb); GetFillFore(ho,Ffr,Ffg,Ffb); Fp:=GetFPat(ho); Ls:=GetLs(ho); Lw:=GetLw(ho); h:=GetLayerByName(layerr); SetClass(ho,classr); dumm:=SetParent(ho,h); IF Attb[1] THEN SetFillColorByClass(ho) ELSE SetFillFore(ho,Ffr,Ffg,Ffb); IF Attb[2] THEN SetFPatByClass(ho) ELSE SetFPat(ho,fp); IF Attb[3] THEN SetPenColorByClass(ho) ELSE SetPenFore(ho,Pcr,Pcg,Pcb); IF Attb[4] THEN SetLwByClass(ho) ELSE SetLW(ho,Lw); IF Attb[5] THEN SetLSByClass(ho) ELSE SetLs(ho,Ls); END; { Dialog driver function subroutine } PROCEDURE Drive_LayerClassT(VAR item:LONGINT; data:LONGINT); BEGIN CASE item OF SetupDialogC:BEGIN GetLayers; h:=ActLayer; CurrentL:=GetLNAme(h); FOR i:=1 to nl DO BEGIN InsertChoice(10,i,Layers); IF Layers=CurrentL THEN SELChoice(10,i,true); END; GetClasses; CurrentC:=ActiveClass; For i:=1 TO nc DO BEGIN InsertChoice(20,i,Classes); IF ClassList(i)=CurrentC THEN BEGIN SELChoice(20,i,true); END; END; OK:=TRUE; END; 1:BEGIN GetSelChoice(20,0,i,Classr); GetSelChoice(10,0,i,Layerr); dupl:=ItemSel(40); go:=ItemSel(30); Attb[1]:=ItemSel(51); Attb[2]:=ItemSel(52); Attb[3]:=ItemSel(53); Attb[4]:=ItemSel(54); Attb[5]:=ItemSel(55); END; 56:BEGIN IF ItemSel(56) THEN BEGIN SetItem(51,True); SetItem(52,True); SetItem(53,True); SetItem(54,True); SetItem(55,True); END; END; END; END; { main body of script } BEGIN dlogID := Define_LayerClassT; dialogIsOK := VerifyLayout(dlogID); IF dialogIsOK THEN BEGIN dlogResult := RunLayoutDialog(dlogID,Drive_LayerClassT); END; IF dupl THEN duplicate(0,0); IF OK THEN ForEachObject(ChangeObject,SEL=true); IF go THEN BEGIN NameClass(Classr); Layer(layerr); END ELSE BEGIN Layer(CurrentL); NameClass(CurrentC); END; END; Run(LayerClassT);[/code]
-
I just post a script that will switch layers/classes on a right click or a shortcut depending on how you set up the plug-in. You still need to select your options, but should save you some moussing arround. Is quite easy to set up some personal options adding some personal procedures. Have a look on the vectorscript area.
-
A little while ago, on a topic I don't remember, somebody gave me the idea for this script... But I never really take the time for it. Fed up by the mousing each time I want to send series of objects to a class or layer, I have a go at it. Since the idea come from the forum, and the subject has been coming back time to time, I'm quite happy to share the code. I would much appreciate to see interesting developments or ideas related to this script... is actually one of the interest of having a forum: share opinions and point of views, not only solve problems! He should work with all selected objects, and the function ForEachObject() could look inside groups or symbols with a different search criteria (I have a version that send specific object types thanks to another entry to the dialog). I've add a couple of options to follow the object (s) to the new layer/class, and to duplicate the selection. I set it up as a plug in with a shortcut and save me a lot of boring work across the screen. Must say thanks to the DialogBuilder developers... code: {/////////////////////////////////////////////////////////////// LayerClassT By: <Kiwi Dec 2003> Built with Dialog Builder 4 © 2001 Nemetschek North America. ///////////////////////////////////////////////////////////////} PROCEDURE LayerClassT; VAR dlogID,dlogResult,nl,nc,i : INTEGER; dialogIsOK,rsrcOK,dupl,go,dumm,OK : BOOLEAN; h,ho: HANDLE; Layerr,classr,currentL,currentC: STRING; Layers,Classes: DYNARRAY OF STRING; { dialog related subroutines } { Dialog definition function subroutine } FUNCTION Define_LayerClassT : INTEGER; VAR dialogID : INTEGER; BEGIN dialogID := CreateLayout('Layer/Class Transfer',True,'OK','Cancel'); CreatePulldownMenu(dialogID,10,25); CreatePulldownMenu(dialogID,20,25); CreateCheckBox(dialogID,30,'Follow objects'); CreateCheckBox(dialogID,40,'duplicate objects'); SetFirstLayoutItem(dialogID,10); SetBelowItem(dialogID,10,20,0,0); SetBelowItem(dialogID,20,30,0,0); SetBelowItem(dialogID,30,40,0,0); SetHelpString(1,'Accepts dialog data.'); SetHelpString(2,'Cancels operation without changes.'); SetHelpString(10,'Slect a layer to transfer your selected object'); SetHelpString(20,'Select the class you want your object transfer to.'); SetHelpString(30,'Go to the selected option with the actual visibility settings'); SetHelpString(40,'Select to duplicate your selected object'); Define_LayerClassT := dialogID; END; { get Layer names to dinarray Layers } Procedure GetLayers; BEGIN nl:=NumLayers; AlLOCATE Layers[1..nl]; h:=FLayer; For i:=1 TO nl DO BEGIN Layers:=GetLNAME(h); h:=NextLAyer(h); END; END; { get Class names to dinarray Classes } Procedure GetClasses; BEGIN nc:=ClassNum; AlLOCATE Classes[1..nc]; For i:=1 TO nc DO BEGIN Classes:=ClassList(i); END; END; { Change each obj settings } Procedure ChangeObject(ho:HANDLE); BEGIN h:=GetLayerByName(layerr); SetClass(ho,classr); dumm:=SetParent(ho,h); END; { Dialog driver function subroutine } PROCEDURE Drive_LayerClassT(VAR item:LONGINT; data:LONGINT); BEGIN CASE item OF SetupDialogC:BEGIN GetLayers; h:=ActLayer; CurrentL:=GetLNAme(h); FOR i:=1 to nl DO BEGIN InsertChoice(10,i,Layers); IF Layers=CurrentL THEN SELChoice(10,i,true); END; GetClasses; CurrentC:=ActiveClass; For i:=1 TO nc DO BEGIN InsertChoice(20,i,Classes); IF ClassList(i)=CurrentC THEN BEGIN SELChoice(20,i,true); END; END; OK:=TRUE; END; 1:BEGIN GetSelChoice(20,0,i,Classr); GetSelChoice(10,0,i,Layerr); dupl:=ItemSel(40); go:=ItemSel(30); END; END; END; { main body of script } BEGIN dlogID := Define_LayerClassT; dialogIsOK := VerifyLayout(dlogID); IF dialogIsOK THEN BEGIN dlogResult := RunLayoutDialog(dlogID,Drive_LayerClassT); END; IF dupl THEN duplicate(0,0); IF OK THEN ForEachObject(ChangeObject,SEL=true); IF go THEN BEGIN NameClass(Classr); Layer(layerr); END ELSE BEGIN Layer(CurrentL); NameClass(CurrentC); END; END; Run(LayerClassT);[/code]
-
I never get the problem before, and may not be the answer, but have you try to do a ResetBBox(h): he forces the object to be recomputed in function of any new input to his definitions.
-
As anybody get a frozen debugger {$debug}? Start to be annoying, WV seems to run find underneath (I can still switch windows) , but no way to get out of the debugger and carry on with my work with out run a Kill. Is nice to be able to exit a script with esc: could we have something with this debugger, or at least be able to run a Kill on it? OSX 10.2.8 Dual 1.24 and plenty of ram VW 10.5 Thanks.
-
He don't seems to be a leak, but my Mac struggle bit time!
kiwi replied to kiwi's topic in General Discussion
hey Paolo, No, the computer is a power mac that I never use to shut down. The daily, weekly and monthly maintenance scripts, run OK. Since the problems started I normally need to restart once a day, causing all sorts of issues with the filemaker pro database I host on my computer (the database never uses more than 11% of the resources). If I don't restart, and after 35-40 min, the computer gets back to normal speed, but thinks like the applescripts I run at specific times with Ical get stock. I have a word with an IT from an apple center, but he as no idea what this think could be! I may just reinstall the OS on a clean disk. Thanks. -
He don't seems to be a leak, but my Mac struggle bit time!
kiwi replied to kiwi's topic in General Discussion
I try to check the disk each two or three weeks (was your advice on a earlier post), and a couple of times since the problem started... -
He don't seems to be a leak, but my Mac struggle bit time!
kiwi posted a topic in General Discussion
A few times, trying to save a VW file I've seen this fancy and colorful icon spinning around for a long long while: up to five minutes! First thinks first I run a unix shell with a u-top, but all looks OK: still plenty of memory free... I as well repair my disk permissions just in case. Next day same think: is becoming so annoying... lets run a kill (unix): doesn't work !!!! for at least four long min. At the same time I try to change a song and find Itunes stock too! fast check and I found that the finder, help, mail and other core app (filemaker is just find) are on the wait for something? Third day all other apps turn off to see if VW is causing the problem... and again at some stage, when saving a file got stock again. I try to restart the computer and after 6 or 7 min I pull the plug... and back to work. Days pass by and is becoming a nightmare... I hope somebody have an idea about what's going on! OSX 10.2.8 (reinstall a month ago with the problems starting under 10.2.6) on a dual 1.25 VW 10.5 Thanks for any help. -
Looks to me like the cursor works much better within a single 3D layer... other mater is across layers, maybe some update... sometime! still this cursor clues and snaps are a great help: try a bit other software out there!
-
Is normal, page 3-11 manual says: "Objects cannot be snapped between 3D layers". Got me too...!
-
Hi brendan, I try your script, but I didn't get any error messages...? (try to restart your VW... could help). Anyways the text didn't resize... I know he should, and the NNA was kind giving the code for "While GetPickObjInfo... " : but that never work well for me, and I normally use a dummy boolean to use this function. Maybe somebody else have a better answer, but the modify code works well in my mac. Hope that helps. Regards. code: Procedure Brendan; Var px,py,px2,py2,texts:Real; Hobject1,Hsymbol,Hobject2,Hsymbol2:Handle; DummyVar,dummyvar2:Integer; DummyV:BOOLEAN; Begin AlrtDialog('Pick text to copy'); GetPt(pX,pY); DummyV:= GetPickObjectInfo(pX,pY,hObject1,hSymbol,dummyVar); texts:=GetTextSize(hobject1,1); AlrtDialog('Pick next text to change'); GetPt(pX2,pY2); DummyV:=GetPickObjectInfo(pX2,pY2,hObject2,hSymbol2,dummyVar2); SetTextSize(hobject2,1,100,texts); END; Run (Brendan);[/code]
-
On the vector depot you can find a really interesting VS that creates 3D trees with nearly unlimited capabilities: http://www.vectordepot.com/PlugIns1.shtml and look for "Tree script" (by Paolo Marcucceti). In the download file you will find a link to a page displaying some nice results with the script.
-
updated to 10.5 on OSX - now I'm in demo mode!!
kiwi replied to Dickon Sire's topic in General Discussion
You should be able to enter serials under preferences/session/serial numbers. -
Touch 3D seems to do a good job. I know that the developer of the software uses VW, and that both together are a good package. Will be good if one day we have something on the 3D power pack: VS can play with 3D polys, but is way over individual scripting to unfold nurbs surfaces!!!
-
You must have seen that before: "unexpectedly quit"
kiwi replied to kiwi's topic in General Discussion
Cloud, The handles are find ($debug should give NIL if anything is wrong), but I rework some variables and a couple of dodgy dynarrays and he seems to run better. Katie, you made my day... not only VW run smoooooth, but that have solve other issues I ad on my mac. I go to try to place a applescript on the cron weekly tasks to prevent future problems. Thanks to both of you, two steps on the right direction... Kiwi -
I need your help Katie! VW 10.5 on OSX 10.2 "unexpectedly quit" more than 10 times on the last hour: I run a few times a medium size VS (400 lines) and either if I do an undo, try to modify components of the drawing or edit a resource VW crashes (the app quit with the message)! Under VW 10,2 this was happening each time I try to undo a similar script, but get quite stable since 10,5, until now... I go to add more procedures and I start to worry how many times a day I need to restart VW , lose the work of the last few min, or how go to behave the plugin on PC workstations where crashes are more time consuming... I check the memory, and looks find: no more than 15%, I check my nerves... no much left! We don't thank you in of for you daily interest and for the +3000 posts on your active. Thanks, Kiwi.
-
I'm running VW 10.5 in OSX 10.2.8 on a dual 1.25 and is sweet like maple syrup. But the must of my work is plugins developing, not drawing... you may need the opinion of somebody do the kind of work you do! But the big question now is Panther: Printing, PDF, serials, network, and all this other issues have keep theTech Board busy with 10.2... a few more days to go!
-
Sorry, I can not give the full develop formula. But, here goes one of the first offset procedures I did when I start to torture nurbs. He only work with 3 vertex (2 sides) polygons and polylines: up to you to clean up my mess and work with arrays to increase the n? of vertex. He will fist ask you to click on the poly to offset, then on the side you want the offset and finally the value. AlexandreBA Villares... where is the check? code: Procedure Offset; VAR x,y,x1,y1,x2,y2,xs,ys,a,b,c,e,off: REAL; d,t: INTEGER; h,h1,h2,h3: HANDLE; o,u: BOOLEAN; p1,p2,p3,p4:POINT; BEGIN; GetPt(x,y); h:=PickObject(x,y); t:=GetType(h); Message (t); GetPolylineVertex(h,1,x,y,d,a); GetPolylineVertex(h,2,x1,y1,d,a); GetPolylineVertex(h,3,x2,y2,d,a); GetPtL(x,y,xs,ys); MoveTo(x,y); LineTo(x1,y1); h1:=LNewObj; a:=HAngle(h1); MoveTo(x1,y1); LineTo(x2,y2); h2:=LNewObj; b:=HAngle(h2); MoveTo(x,y); LineTo(xs,ys); h:=LNewObj; c:=HAngle(h); e:=90; IF c<a Then e:=-90; DelObject(h1); DelObject(h2); DelObject(h); off:=RealDialog('OffsetValue','0'); p1.x:=x+( off* Cos(Deg2Rad(a+e)) ); p1.y:=y+( off* Sin(Deg2Rad(a+e)) ); p2.x:=x1+( off* Cos(Deg2Rad(a+e)) ); p2.y:=y1+( off* Sin(Deg2Rad(a+e)) ); p3.x:=x1+( off* Cos(Deg2Rad(b+e)) ); p3.y:=y1+( off* Sin(Deg2Rad(b+e)) ); p4.x:=x2+( off* Cos(Deg2Rad(b+e)) ); p4.y:=y2+( off* Sin(Deg2Rad(b+e)) ); LineLineIntersection(p1,p2,p3,p4,o,u,p2); IF t=5 Then Smooth(0); IF t=21 Then Smooth(1); BeginPoly; AddPoint(p1.x,p1.y); AddPoint(p2.x,p2.y); AddPoint(p4.x,p4.y); EndPoly; END; Run (Offset);[/code]
-
converted lines do not respond to mouse modification
kiwi replied to Kurt Magness's topic in General Discussion
I just draw a 3d line, convert to lines... and I couldn't reshape, just resize? but On the OPI the object show to be a group: Ungroup... haaa! thats better. But the strange think on your case is this export/import VW 9. If Ungroup the lines doesn't work have a look at the information on the OPI to see witch kind of object are you dealing with: he should be a line. -
Cool... Strange, when playing with the nurb surface on GL, I found that the closer I get to a top view the biger the hole I get on the middle of the shape??? draw a few more and he looks that if Height > Diameter the GL rendering have a problem. I don't have RW to try, but I wonder in witch cases the GL will let me down. On a Dual 1.25 G4 OXS and plenty of ram.
-
converted lines do not respond to mouse modification
kiwi replied to Kurt Magness's topic in General Discussion
On a 3D layer you will no be able to modify objects that are in otrer layers... try to work on your object layer, or change your 3D layers to 2D. -
Never realized the offset was missing, but I never found the Trim and Extend functions, and at the end develop my own Trim procedure. Offset a poly (plygon and polyline) on a vs work relatively well with a bit of trigo on the vertex: Say a (x,y) vertex, a,b the angles from/to the two adjacent vertex and ofs my offset value the simplify formula looks close to: Xnew:=x+( ofs*(Cos (a)+Cos (-b)) ); Ynew:=y+( ofs*(Sin (a)+Sin (-b)) ); The open ends need a modif but the general idea is the same. The angles need a good control: they can change the side for the offset, and should be in radiants for the trigo funtions. I use a similar formula (but on 3D) to work on nurbs, but the first study was done on polys.