Jump to content

Martin Crawford

  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Martin Crawford

  • Rank

Personal Information

  • Location
    United States

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Martin Crawford

    Importing Sketchup Pro

    I am having an issue when importing Sketchup Pro drawings into VW. All the lines come in at 12 and the fills are removed. I am working on the why, however I am wondering if it would be possible to loop through all objects / symbol in the import and do the following: Change the render to Open GL Change the line weight to 2 Change the fill to solid and a color Has anyone done something similar before, if so can you hint on how this would be done. Thanks Martin
  2. Martin Crawford


    So exporting the scripts showed that the link text happens after the symbol is created and before the record is attached. I'm not clear on they why, but it works. I'm still looking at making them on plug-ins, I think it is a better overall solutions. Thanks
  3. Martin Crawford


    Very helpful, I will read up on Red symbols. Thanks
  4. Martin Crawford


    The script creates around 100 symbols for the different LED panels we use. I'm then have several scripts that create plugins for a full screen. I use the symbols as I'm not sure how I would create a plugin using a plugin and if it would speed up the process. Another reason I use the symbol is I attach the size, weight, resolution, power and other specification data into the symbol that I use in a set of worksheets. How would I go about creating them as plugins instead of symbols? I forgot you could export a something as a script, I need to remember that as it would make things easer. I will try the script and see how it works. Thanks
  5. Martin Crawford


    Strange, but this does not seem to make a difference. When I run the script it creates everything, assigns the record correctly, however it does not link the ID to the record. I can attach the full py file if that is helpful. Martin
  6. Martin Crawford


    I have the following code that does everything, except link the text to the record. It works if I do it manually, but not in code. Any thoughts? vs.BeginSym(panelName) TopX = (width_mm / 2) * -1 TopY = (height_mm / 2) BotX = (width_mm / 2) BotY = (height_mm / 2) * -1 vs.Rect(TopX, TopY, BotX, BotY) #Create the ID Text vs.TextFont(vs.GetFontID('ClanPro-Medium')) vs.MoveTo(0,0) vs.TextOrigin(0,0) if height_mm > 1000: vs.TextSize(22) elif height_mm > 700: vs.TextSize(18) elif height_mm > 500: vs.TextSize(14) else: vs.TextSize(12) vs.CreateText('ID') tObj = vs.LNewObj() vs.SetTextJust(tObj, 2) vs.SetTextVerticalAlign(tObj, 3) vs.SetTextWidth(tObj, width_mm) vs.SetOpacity(tObj, 30) #Link ID Number to ID vs.LinkText(tObj, 'LED Install - Panel', 'ID') vs.EndSym()
  7. Martin Crawford

    Updating Plugin Pop-Up Choices

    When I said scripts, I really meant custom plug-in objects. I would like to update all the plug-in with the same drop-down. Does that change the approach?
  8. Martin Crawford

    Updating Plugin Pop-Up Choices

    I have a set of scripts that all use an equipment model number to work. I would like to know if there is a way that I can have a script update the pop-up choices on all the scripts. This would would make adding new equipment faster, especially as I already have a script that creates the equipment. Thanks Martin
  9. Martin Crawford

    Viewport & Custom Plugin

    Brillant! Thanks!
  10. Martin Crawford

    Viewport & Custom Plugin

    Typically I start the tool when I am already inside the viewport, is there a way to tell if I'm already in the viewport? Or How do I get a handle to an object as at the beginning of the tool, I haven't drawn anything. Does my question make sense? Thanks Martin
  11. Martin Crawford

    Viewport & Custom Plugin

    I have a custom plugin that I am using and I would like to know if there is a way to determine if the the plugin is being created inside of a viewport annotation. I have different math depending on where the plug-in is used. Thanks Martin
  12. Hi I have successfully (only with help from the smart folks on the forum) to select a bunch of object, then create (3) sheet layers for each object. I finally got it working, and now I have a few cleanup details left. 1) How can I force a complete redraw of the layer after the title block is placed. It does not appear in the correct location and I have tired everything to try and make it work. ResetObject ReDrawAll ReDraw ResetObject(layer) Nothing seems to make any difference at all, except when the script is done running everything pops into place. What I trying to accomplish is place the title block on the page, get it to reset correctly. Inside the tile block there are a number of loci that control where I would like my viewport in the drawing and help me determine the best viewport scale. 2)When creating the sheet layer, I add a title block. When the scripts ends, the field Total Num Sheets is incorrect, it needs to be reset. Is there a way to force a reset of the tile block so the value is correct. Thanks Martin
  13. Martin Crawford

    Viewport Position

    I finally got it working. I'm not sure why, however a ResetObject was needed after the layers and classes were turned on. Thanks for pointing me the right direction. For some reason this was tough to get working. Again, Thanks! Martin
  14. Martin Crawford

    Viewport Position

    Wow! Nice reference! Not related, but a long time ago I have a VW bug. I found a book on VW repair. This book was so well done that at 14 I rebuilt the engine one a 1969 classic VW. It ran for years. I wish I had the same book for VW & Python scripting. Every step seems like a slugfest. I've been banging my head against the wall all day trying to get viewport centering to work correctly. Using the following code: viewPort_X and viewPort Y are always 0. What is super strange, is when I run the script it leaves me on the last sheet layer created and I can see a viewport created at 0,0 (with a red x through it). If I change sheet layers and change back, the viewport shows up in the wrong location. You can see the two attached screen shots to see what I am talking about. I've tried adding ReDraw and ReDrawAll in multiple points in the code and it makes no difference. I'm using 2108 sp3. It seems like some type of reset or redraw is required after the VP is created or maybe after the crop is set. Any thoughts? Martin
  15. Martin Crawford

    Viewport Position

    MullinRJ How do you know they are read only? When I look at the appendix I see the following: Scale 1003 REAL ObjectVariableReal Viewport x Position 1024 REAL ObjectVariableReal Viewport x Position 1025 REAL ObjectVariableReal I don't see anything that would indicate 1024 and 1025 are read only. Where do you find that nugget of information. Thanks


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.