Jump to content

Assembly

Member
  • Content Count

    430
  • Joined

  • Last visited

Everything posted by Assembly

  1. I was just wondering how big the resource list could be. I have about 700-800 symbols in separate files in the same folder, which are being imported dynamically depending on the name of the symbol. It also looks like that the number of symbols is going to increase. Thank you
  2. Hi, Pat. I took your advice and had a look at options which applescript gives and I think I found the solution. Thank you!
  3. Hi I was wondering if there is anyway to create a vectorscript PROCEDURE which will export a symbol into file as the symbol being created. Alternative will be to create a procedure which will open the VW file create the symbol and close the file. Any help will be highly appreciated.
  4. I think I saw a post a while back that included a procedure as a variable. IE Procedure RunThisSubProcedure(TheSubProcedure:PROCEDURE); Begin; TheSubProcedure; Message('Im Running:', TheSubProcedure); END; RunThisSubProcedure(DrawGoodThings); Can anyone point me to this, or can someone expand on how to do this?.
  5. Anyone know how to insert a bmp or any type of image file with VS?.
  6. FUNCTION BuildResourceList( TYPE :INTEGER; folderIndex :INTEGER; subFolderName :STRING; VAR numItems :LONGINT) : LONGINT; Is there a similar function that allow a full custom path?. I'm looking for a function that does exactly what BuildResourceList does with out the folder index. I'd like to build a list of symbols in a File located on a network hardrive. BuildResourceList defines the starting path. Is there one? Has anyone developed there own?. If not then does anyone know how to get access to the resources of an external file from VS?.
  7. please move the VWCertificateA.txt file location. In VW2009 we could use a dropbox folder as our User Data and Preference Folder Path This was a very simple way for us to sync all the workstations to have in the office. Very easy to manage and keep up to date all preference folders symbol folders and Plug in Objects. The VWCertificateA.txt seems to be new since 2010. The Dropbox keeps overwriting the certificate from the different computers, it requires constant connection to the internet to register the serial number. Thus it prevents us from using the drop box. I use lots of custom PIO. The admin for my small office just grew significantly to keep all stations consisten.
  8. Yes DWorks that is it. I just realized I can use a static text type on the PIO and set that. Easy
  9. Is there a quick hack to create a script to reposition pallets. I have a 27 monitor for my laptop I seem to be forever rearranging my pallets.
  10. I tried vsoAppendWidget can't get this to load the file I can use vsoInsertWidget. This call is placed during the event of kObjOnInitXProperties: I can use: vsoWidgetSetText(buttonID_3,Concat('FilePath:',p__Temp)); to feed information back to the field. But the timing is odd. The field only updates when I re:select the object. Ie deselect then select again. It is not automatically updating?.
  11. I'd like to be able to use a menu to export symbols to specific files. But I think file access is outside VS scope. Can it be done?
  12. How does one return information back to the OIP?. Precedent: Rectangle tool returns Perim: Area:
  13. Got it. BuildResourceList(defConResType, defConFoldID, '', defConCount); The '' is for a sub folder. I created a subfolder in the user directory and included the folder name. BuildResourceList(defConResType, defConFoldID, 'Basin', defConCount); This now loads only the symbols from basins.
  14. Below is a drop in function I'm testing. Use at your own risk... working alright for me so far. This function can be used with an event enabled button. Basic dialog that looks at external file to build a Symbol Resource. It will import the symbol into the current file and place in the folder name. I'd like to refine and build a specific list from an external files symbol folder rather than one large list. Can anyone point me to some documentation that might help. Thanks Function ImportSymbol(FolderID:INTEGER;FolderName:STRING):Handle; CONST kStartStringAt = 3000; kOK = 1; kCancel = 2; kImagePopup15 = 15; kStaticText28 = 28; kStaticText29 = 29; kRight = 1; kBottom = 2; kLeft = 3; kResize = 0; kShift = 1; VAR dialog1 :INTEGER; gImagePopup15Int :INTEGER; gImagePopup15Str :STRING; defConListID :LONGINT; defConResType :INTEGER; defConFoldID :INTEGER; defConCount :LONGINT; xmlID :LONGINT; cnt :INTEGER; int :INTEGER; boo :BOOLEAN; str :STRING; ndx :INTEGER; iImage:INTEGER; FUNCTION ResourceIsOK :BOOLEAN; BEGIN IF SetVSResourceFile('IP Resources') THEN ResourceIsOK := TRUE ELSE Message('The "IP Resources" file was not found.'); END; FUNCTION GetPlugInString(ndx :INTEGER) :STRING; BEGIN CASE ndx OF {Static Text} 3001: GetPlugInString := 'OK'; 3002: GetPlugInString := 'Cancel'; 3003: GetPlugInString := 'Untitled Dialog'; 3028: GetPlugInString := 'Image:'; 3029: GetPlugInString := 'Import Symbol:'c; {Help Text} 4001: GetPlugInString := 'Accepts dialog data.'; 4002: GetPlugInString := 'Cancels operation without changes.'; 4015: GetPlugInString := 'An image popup control.'; 4028: GetPlugInString := 'Static text control.'; 4029: GetPlugInString := 'Static text control.'; END; END; FUNCTION GetStr(ndx :INTEGER) :STRING; BEGIN GetStr := GetPlugInString(ndx + kStartStringAt); END; PROCEDURE dialog1_Setup; BEGIN dialog1 := CreateLayout(GetStr( 3), True, GetStr(kOK), GetStr(kCancel)); CreateControl (dialog1, kImagePopup15, 10, '', 0); CreateStaticText (dialog1, kStaticText28, GetStr(kStaticText28), 12); CreateStaticText (dialog1, kStaticText29, GetStr(kStaticText29), 12); SetFirstLayoutItem(dialog1, kStaticText29); SetBelowItem (dialog1, kStaticText29, kStaticText28, 0, 0); SetRightItem (dialog1, kStaticText28, kImagePopup15, 0, 0); AlignItemEdge(dialog1, kImagePopup15, kLeft, 222, kShift); FOR cnt := 1 TO 6 DO SetHelpString(cnt, GetStr(cnt + 1000)); END; PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT); BEGIN CASE item OF SetupDialogC: BEGIN defConResType := 16; defConFoldID := FolderID; defConListID := BuildResourceList(defConResType, defConFoldID, '', defConCount); FOR cnt := 1 TO defConCount DO BEGIN int := InsertImagePopupResource(dialog1, kImagePopup15, defConListID, cnt); END; END; kOK: BEGIN iImage:=GetImagePopupSelectedItem(dialog1, kImagePopup15); ImportSymbol:=ImportResourceToCurrentFile(defConListID, iImage); IF GetObject(FolderName)=NIL Then Begin; NameObject(FolderName); BeginFolder; EndFolder; END; InsertSymbolInFolder(GetObject(FolderName),ImportSymbol) END; END; END; BEGIN gImagePopup15Int := 0; gImagePopup15Str := ''; IF ResourceIsOK THEN dialog1_Setup; IF RunLayoutDialog(dialog1, dialog1_Handler) = 1 then BEGIN END; END;
  15. I have installed but have not had a fresh start. I have a lot of custom tools that speed me up. Bit of a task to keep up to date. My files get complex. I push VW, I can not afford to loose a file. Concerned for comments on how slow it runs.
  16. I purchased the 2011 upgrade when it first came out. I am looking to start a new project. I see lots of complaints, not many happy Interested to hear positive experiences if any. What do you recommend?
  17. Vectorworks 2011 Service Pack 3 Download Page These downloads will update all English-language Vectorworks 2011 products (Designer, Architect, Landmark, Spotlight, Fundamentals, and Renderworks) to version 2011 SP3. If you are currently using a version of Vectorworks prior to 2011, you must first install version 2011 and then update it to 2011 SP3 using this updater. Yes we do speak english in New Zealand. And why has the 'Check for Update' Menu command been removed from the standard workspaces?.
  18. WTF Downloaded the updater. 'You have entered a serial number (Distributor code: NZ) thiat is not valid for this updater (built for:NNA). Please contact technical support for more information, or enter a new serial number. Why can't New Zealand vector work users get the update?.
  19. Ouch. I haven't checked out the techboard for a while. VW did a great job at marketing the virtues of VW2011 we paid for the upgrade. Early on people were saying that there were problems with upgrading project files thus we decided to finish out the 2009 projects. We push VW pretty hard, don't know about others but I find viewport pretty untrustworthy. I thought upgrades might lead to less problems rather than more. I used to be an addict. But they say when the come down is worse than the high it's time to take stock.
  20. Thanks Joshua. That does it. I modified the function below. I can now create my own folder of resource files to store symbols I want to access. BUT (there always is a but with VS) BuildResourceList does not keep track of the file from which the list is built from. If you have two files located in the resource folder it will load the symbols of both folders. The function returns a handle to the Symbol, BUT as the symbol is not yet in the file it can't be used. I need to use CopySymbol to import the symbol to the current file. To use copy symbol I have to know the path to the file which the symbol is in. urgh. FUNCTION ImageSelectResourceFile(FolderID:String):HANDLE; VAR dialog1 :INTEGER; int :INTEGER; str :STRING; iCount: INTEGER; SymDefCount:INTEGER; hTemp: HANDLE; SelectINT:INTEGER; SymString:STRING; ListID:LONGINT; PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT); BEGIN CASE item OF SetupDialogC: BEGIN str := GetSDName(FSymDef); int := InsertImagePopupObjectItem(dialog1, 4, str); ListID := BuildResourceList(16, -14, Concat('Assembly:',FolderID), SymDefCount); FOR iCount := 1 TO SymDefCount DO BEGIN int := InsertImagePopupResource(dialog1, 4, ListID, iCount); END; END; END; SelectINT:=GetImagePopupSelectedItem(dialog1,4); SymString:=GetImagePopupObject(dialog1,4,SelectINT); END; BEGIN dialog1 := CreateLayout(Concat('Select From'), FALSE, 'OK', ''); CreateControl(dialog1, 4, 10, '', 0); SetFirstLayoutItem(dialog1, 4); int := RunLayoutDialog(dialog1, dialog1_Handler); ImageSelectResourceFile:=GetObject(SymString); END;
  21. A couple functions that build image selector dialogs... Still can't see how to get access to symbols in my own file. PROCEDURE Tryit; FUNCTION ImageSelectSymbolFolder(FolderName:STRING):HANDLE; VAR dialog1 :INTEGER; int :INTEGER; str :STRING; iCount: INTEGER; hTemp: HANDLE; SelectINT:INTEGER; SymString:STRING; PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT); BEGIN CASE item OF SetupDialogC: BEGIN str := GetSDName(FSymDef); int := InsertImagePopupObjectItem(dialog1, 4, str); iCount:=0; hTemp:=FInFolder(GetObject(FolderName)); While hTemp<> NIL Do BEGIN; iCount:=iCount+1; int:=InsertImagePopupObjectItem(dialog1, 4, GetSDName(hTemp)); hTemp:=NextSymDef(hTemp); END; END; END; SelectINT:=GetImagePopupSelectedItem(dialog1,4); SymString:=GetImagePopupObject(dialog1,4,SelectINT); END; BEGIN dialog1 := CreateLayout(Concat('Select From: ',FolderName), FALSE, 'OK', ''); CreateControl(dialog1, 4, 10, '', 0); SetFirstLayoutItem(dialog1, 4); int := RunLayoutDialog(dialog1, dialog1_Handler); ImageSelectSymbolFolder:=GetObject(SymString); END; FUNCTION ImageSelectResourceFile(FolderID:INTEGER):HANDLE; VAR dialog1 :INTEGER; int :INTEGER; str :STRING; iCount: INTEGER; SymDefCount:INTEGER; hTemp: HANDLE; SelectINT:INTEGER; SymString:STRING; ListID:LONGINT; PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT); BEGIN CASE item OF SetupDialogC: BEGIN str := GetSDName(FSymDef); int := InsertImagePopupObjectItem(dialog1, 4, str); ListID := BuildResourceList(16, FolderId, '', SymDefCount); FOR iCount := 1 TO SymDefCount DO BEGIN int := InsertImagePopupResource(dialog1, 4, ListID, iCount); END; END; END; SelectINT:=GetImagePopupSelectedItem(dialog1,4); SymString:=GetImagePopupObject(dialog1,4,SelectINT); END; BEGIN dialog1 := CreateLayout(Concat('Select From'), FALSE, 'OK', ''); CreateControl(dialog1, 4, 10, '', 0); SetFirstLayoutItem(dialog1, 4); int := RunLayoutDialog(dialog1, dialog1_Handler); ImageSelectResourceFile:=GetObject(SymString); END; BEGIN; Message(ImageSelectResourceFile(125)); END; RUN(Tryit);
  22. Anyone know how to build a list of symbols from another file?. I've looked at kSymDef:=16; kRepetMasonary:=127; BuildResourceList(kSymDef,kRepetMasonary,'',ListCount): This builds a list of masonary repeat symbols. I want to be able to create my own file in the user folder which I can access to build a symbol def list from.
  23. Happy New Year All. I can't figure how to get a handle to the symdef. I want to be able to use the Symbol string to get a handle to the symbol def. Something Like; Function GetSymbolDef(SymbolName:STRING): Handle;

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...