Jump to content

DCarpenter

Member
  • Content Count

    73
  • Joined

  • Last visited

Everything posted by DCarpenter

  1. WOW!! I feel like I got the "A" team jumping on this, and so interesting to see how each of you would tackle this issue. I like the way Julian came at my problem so I took his code and revised it a bit to meet my needs. It still needs to be refined a bit but it does what I need it to do for now. I probably lost hours of time trying to figure out which selection procedures to use between the Selection class and the Document List Handling class. The code you all shared with me was super helpful with helping me steer my thoughts and direction. Thank you all for offering your help. The three of you are the pillars of this Forum. I wrote this code because sometimes I get DWG files where the end points of lines to exactly match, so when I use the 2D polygon, paint bucket, tool, I'm unable to fill different cavities quickly. So I figured a quick little script to extend all the lines 2" in either direction should do the trick, and then when I was done, I could use the same tool to restore everything back to normal. Dave PROCEDURE IncreaseLength; VAR h1 : HANDLE; i,k: INTEGER; rCenterX, rCenterY : REAL; rScaleFactor : REAL; rExistLen, rNewLen : REAL; MyH: DYNARRAY [] OF HANDLE; BEGIN SelectObj(T=2); i:=NumSObj(ActLayer); ALLOCATE MyH[1..i]; h1:=FSActLayer; FOR k:=1 TO i DO BEGIN MyH[k]:=h1; h1:=NextSObj(h1); END; DSelectAll; rNewLen := RealDialog('Length increase:','2'); k:=1; WHILE (k <= i) & (i <> 0)DO BEGIN HCenter(MyH[k], rCenterX, rCenterY); rExistLen := HLength(MyH[k]); rScaleFactor := (rExistLen+rNewLen) / rExistLen; SetSelect(MyH[k]); Scale(rScaleFactor, rScaleFactor); DSelectAll; k:=k+1; END; END; Run(IncreaseLength);
  2. Thank you for the clarity. I was hoping there was a way of selecting the center of the line and then changing it's length like I can do in the OIP manually, without doing all the math, but I guess not. Bummer. HScale might work for me though. Thank you once again. Dave
  3. I've created a PIO that selects all the lines from the visible layer on the drawing. Now I simple want to increase each line's length by 2" (user defined), from it's center. How do I make sure it's length changes from it's center? Dave
  4. Pat, Bummer, but thank you for your alternative solution. Trying to make it as simple as possible in order to safeguard it from being messed up by the end user. Your suggestion got me thinking about another possibility. Thankful for your prompt reply and accessibility. Dave
  5. I'm stuck, See attached Excel worksheet image for clarification of what I'm trying to do in VW. I've created a worksheet in Vectorworks with four different database rows in it. Each database row calculates, summarize, and displays information in a different layout than the others, but the one thing they have in common is that they all get their information from the same three layers in the VW drawing. What I'd like to do is create one place (C14,D14, and E14 in attached image) that can determine what layers are used in the four databases (rows 20, 22, 24, and 26), so the user doesn't have to edit the criteria for each database. Is that possible? In excel I can create a cell that has a pull-down list of values the user can choose from. If it's possible, I would love to do that in the VW worksheet where the pull down is a list of the layers in the VW document, then each database row would reference those cells to determine which layers to look at. I am comfortable writing my own script if that's helpful, but am hoping there's an easier way to do this within the worksheets. Any thoughts?
  6. ok, thanks. Yes, I found a really great script someone posted a few years ago that really help. Thank you.
  7. wow, that would make sense. This is my first time creating an event enabled script. Do I have to move entire script into Event 3? Is this a general rule of thumb when working with event enabled scripts?
  8. So I've created a simple script that duplicates a selected symbol from a pop-up window. I've also added an event script that changes the "Distance" parameter based on the symbol selected. Developer mode is 'off', but I don't understand why when the PIO is executed that it creates a second set of symbols outside of the PIO. That second set of symbols are always in the exact same location in every drawing, regardless of where the PIO is. I've attached a screen shot if it's helpful. Any ideas why?
  9. SetName() and the Batch Rename tool are exactly what i needed. I remembered seeing that batch rename tool in the highlight reel for 2020 but could never figure out where it was. I kept on looking for it in the Organization window for layers and classes, but now that i know where it is, it's like a whole new day! Thank you for your help, Dave
  10. Julian, According to the description of the SetSymbolOptionsN(), it only sets the insertion options and class of the symbol. Dave
  11. Writing a simple script to add a prefix to all the symbol names in the drawing but can't seem to find the command to replace the current name with a new name. I can get a handle to each symbol in the drawing and its name, but can't figure out the command to write a new name for the symbol? thoughts? H1:=FInSymDef(H1); {will get me the handle to the first symbol in the drawing} SymName:=GetSDName(H1); {will get me the current name of the symbol} current symbol name: "Toilet" symbol name after the script is run: "Toilet-1"
  12. UGH! Thank you for your help. I was in the VS:Function_Reference doc but was looking under Layer section. I couldn't figure it out because that's the only place I could imagine it would be. Thanks Pat.
  13. Easy question #323, I know that FLayer will give me a handle to the first layer, but how do I now get a handle to the second or third layer in the list?
  14. Thanks for helping this elementary kid out with his math problems. Your a big help, thanks.
  15. simple question. On this project, I created a new layer with a story (elevation) of 133", now every new layer created since then has that same elevation. How do I change that? Some how I change it and now its a default that I don't want. I just don't know how I changed it. dave
  16. Thanks I guess I'll try it, but I thought that command worked along side CreateCustomObjectProfile, which would be more of a extrude along a path sort of thing, which is why I thought I was barking up the wrong tree. I'll give it a shot. Thank you.
  17. Sorry to trouble you, just hitting a wall. I created a 2D Path Object (called 'Skirting') that creates a drape line along its defined 2D path. Now I'm trying to create a command that converts any selected polygon, rectangle, or line, into the 'Skirting' PIO, by taking the vertices of those objects and inserting them into the 'Skirting' PIO. The only problem is I can't figure out is how to insert those vertices that I have stored in a vector array into the PIO after calling it with TF:=CallToolByName('Skirting'); Any thoughts? Dave
  18. So we think the current rule of thumb is the trust the VW oval, but to NOT use the offset command. Kind of surprised VW hasn't addressed this issue. This topic seems to have a long and rich history in these forums. I'll give it a try...
  19. I read a thread that said mathematically the VW oval isn't an ellipse, but what drawing modes are you referring to?
  20. I know this has been talked about to GREAT lengths, but whats the solution? Has someone written a PIO that draws a true ellipse? ... I'm designing a fairly large production that revolves around a large elliptical stage with a lot of other custom elliptical pieces and would like them to be true. Looking for some direction from those who live in the forum. I've wasted a bunch of time reading past post that don't seem to come to a resolution. Any final words on this issue? Thanks for the help, Dave
  21. I have a number of rooms on my drawing, and each room has a closed polygon around it that I've named that given rooms name, so when I want to summarize all the items in each room all I have to do is create a worksheet with criteria that's pretty basic. All the items on layer 'Room items' that fall within the location of 'Room1'. This works great, but what I'm struggling with is how to call out the location name 'Room1' in the resulting search criteria cells (if that makes sense). i.e. in the attached file, I'd like cell D3.1 and D3.2 to have the name of the location the items were found in. Any thoughts?
  22. Thanks Pat for sharing that sudo code, that helped me a lot. Dave
  23. That's helpful to know, I might give that a try. Thanks.
  24. How would you call a PIO (*.vso) in your script? I've always thought it was better to do it as an "Include" file.

 

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...