Jump to content

The Hamma

Member
  • Content Count

    189
  • Joined

  • Last visited

Posts posted by The Hamma


  1. 1 hour ago, MaltbyDesign said:

    I work in the Architect Workspace and it doesn't show the option to Export to Unreal Datasmith. It does show up in the Architect-BIM and Fundamentals workspaces, though. How can I get this to show up in the Architect workspace? Or do I have to go into a different workspace when I want to export a file?

     

    You have to edit the Architect Workspace that you are using.  The new command can be found in the import/export options on the left side of the editor.  Move it to the right side of the editor. 

     

    • Like 1

  2. Pat answered the question well.  You can combat this with class settings and possibly layering viewports.   I would recommend watching the RENDERING FOR EVERYDAY ARCHITECTURAL DRAWING course.  

     

    Also I have revised by scripts and they are below. 

     

    A word of caution they use a different record.  I revised the record to be "Status and Phase" to be more inline with the way others were using the terminology.  I also added records for demolition and new construction notes.   I would recommend not converting to the new format on an existing drawing because the new scripts do not work with the older data visualizations that I provided in the first files.  But if you do want to I have written another script to convert a drawing using the old script to the new scripts.  script =  "Convert to new Status and Phase record script from old Record" 

     

      You have to import the "Status and Phase" record into the old drawing before running the conversion script.  It will convert everything with out selection.   All of my Python Scripts may be freely distributed. No warranty provided. Use at your own risk.

     

    Once you replace the scripts in you plugin folder the old record format will not work. 

    image.thumb.png.6fc664c185dddfa17cc9768927812bad.png

     

    Adding notes to the record you can use data tags to show the notes

    image.thumb.png.6877e21cdbbef486a29a25d56b4ce5ef.png

     

     

    Status and Phases revised.vwx 1 Existing Object.vsm 2 Demo Object.vsm 3 New Object_Class.vsm 4 Demo (DemoClass).vsm 5 Remove Phase Record.vsm 6 New Object.vsm

    • Like 1

  3. In trying out the new Export Unreal Datasmith many of the objects in my model are not present in Twinmotion.  Has anyone else tried this?  Is there a limit to the amount of objects that can be exported?


  4.  

    On 2/12/2021 at 2:27 PM, JBenghiat said:

    I think the issue is that you just keep appending handles into hVP. As above, this is where using return values instead of globals would make this clear.

    Fixed it. Thanks!

    ecnt = reset = xP = yP = vcnt = ocnt =scnt= mcnt= pcnt  = 0
    
    def count(h4):
    	global vcnt, ocnt, mcnt, ecnt,scnt,pcnt
    	ocnt += 1
    	if vs.GetTypeN(h4) == 5:
    		vcnt += vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 21:
    		vcnt += vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 25:
    		vcnt += vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 40:
    		mcnt += 1	
    	if vs.GetTypeN(h4) == 24:
    		ecnt += 1		
    	if vs.GetTypeN(h4) == 84:
    		ecnt += 1		
    	if vs.GetTypeN(h4) == 95:
    		ecnt += 1
    	if vs.GetTypeN(h4) == 34:
    		ecnt += 1		
    	if vs.GetTypeN(h4) == 15:
    		scnt += 1		
    	if vs.GetTypeN(h4) == 86:
    		scnt += 1	
    
    
    def DoIt(h5):
    	global reset,xP,yP, vcnt, ocnt, mcnt,scnt, ecnt,pcnt
    	vs.ForEachObjectInList(count, 0, 2, vs.FInSymDef(h5))
    	vs.SetRecord(h5,'Obj Count')
    	vs.SetRField(h5,'Obj Count','Obj Count',vs.Num2Str(0,ocnt))
    	vs.SetRField(h5,'Obj Count','Vertex Count',vs.Num2Str(0,vcnt))
    	vs.SetRField(h5,'Obj Count','Mesh Count',vs.Num2Str(0,mcnt))
    	vs.SetRField(h5,'Obj Count','3D Volume Count',vs.Num2Str(0,ecnt))
    	vs.SetRField(h5,'Obj Count','Nested Symbol Count',vs.Num2Str(0,scnt))
    	vs.SetRField(h5,'Obj Count','PIO Count',vs.Num2Str(0,pcnt))
    	vcnt = ocnt = mcnt = ecnt =scnt =pcnt = 0 #reset to variable to 0
    	vs.Symbol(vs.GetSDName(h5),xP,yP,0)
    	xP += 300
    	if xP > 5000:
    		xP = 0
    		yP += 300
    
    
    if vs.GetObject('Obj Count') == []:
    	vs.NewField('Obj Count', 'Obj Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Vertex Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Mesh Count', '0', 4, 0)
    	vs.NewField('Obj Count', '3D Volume Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Nested Symbol Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'PIO Count', '0', 4, 0)
    
    hSEL = []
    h1 =vs.FSymDef()
    while h1 != []:
    	hSEL.append(h1)
    	if vs.GetTypeN(h1) == 92:
    		h2 = vs.FInGroup(h1)
    		while h2 != []:
    			hSEL.append(h2)
    			h2 = vs.NextObj(h2)
    	h1 = vs.NextObj(h1)
    
    for h in hSEL:
    	if vs.GetTypeN(h) == 16:
    		DoIt(h)

     


  5. In def DoIt(h5): I am resetting the variables vcnt,  ocnt, and mcnt  to  0 but when it runs for h4 in hVP:  the variables return to their state the last time def count(h4): was triggered by  for h4 in hVP:.  I want  vcnt,  ocnt, and mcnt  to  be 0 every time  the for h4 in hVP: loop starts.   Help please. 

     

    I am checking the state of the variable  at this point it the below script

                vs.SetRField(h5,'Obj Count','Obj Count',vs.Num2Str(0,ocnt))
                vs.AlrtDialog(ocnt) #Displays current count but for somereason is adding the previous count to the current count
                vcnt = ocnt = mcnt = 0 #reset to variable to 0
                vs.AlrtDialog(ocnt) #displays that variable has been reset to 0

     

    reset = xP = yP = vcnt = ocnt = mcnt = 0
    
    def count(h4):
    	global vcnt, ocnt, mcnt
    	ocnt += 1
    	if vs.GetTypeN(h4) == 5:
    		vcnt += vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 21:
    		vcnt += vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 40:
    		mcnt += 1			
    
    def DoIt(h5):
    	global reset,xP,yP, vcnt, ocnt, mcnt
    	if h5 != []:
    		if vs.GetTypeN(h5) == 16:
    			GetHandles(h5)
    			for h4 in hVP:
    				count(h4)
    			vs.SetRecord(h5,'Obj Count')
    			vs.SetRField(h5,'Obj Count','Obj Count',vs.Num2Str(0,ocnt))
    			vs.AlrtDialog(ocnt) #Displays current count but for somereason is adding the previous count to the current count
    			vcnt = ocnt = mcnt = 0 #reset to variable to 0
    			vs.AlrtDialog(ocnt) #displays that variable has been reset to 0
    			vs.SetRField(h5,'Obj Count','Vertex Count',vs.Num2Str(0,vcnt))
    			vs.SetRField(h5,'Obj Count','Mesh Count',vs.Num2Str(0,mcnt))
    			vs.Symbol(vs.GetSDName(h5),xP,yP,0)
    			xP += 300
    			if xP > 5000:
    				xP = 0
    				yP += 300
    
    def GetHandles2(h1):	
    	while h1 != []:
    		hSEL.append(h1)
    		if vs.GetTypeN(h1) == 92:
    			h2 = vs.FInGroup(h1)
    			while h2 != []:
    				hSEL.append(h2)
    				h2 = vs.NextObj(h2)
    		h1 = vs.NextObj(h1)
    
    def GetHandles(h5):	
    	h2=vs.FInSymDef(h5)
    	while h2 != []:
    		hVP.append(h2)
    		itParent = vs.GetTypeN(h2)  # Get Parent type
    		if itParent == 11:
    			h3 = vs.FInGroup(h2)
    			while h3 != []:
    				hVP.append(h3)
    				h3 = vs.NextObj(h3)
    		h2 = vs.NextObj(h2)
    
    if vs.GetObject('Obj Count') == []:
    	vs.NewField('Obj Count', 'Obj Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Vertex Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Mesh Count', '0', 4, 0)
    
    
    hVP = []
    hSEL = []
    GetHandles2(vs.FSymDef())
    for h5 in hSEL:
    	if vs.GetTypeN(h5) == 16:
    		DoIt(h5)

     


  6. Thanks I have that working but now my counts and my symbol placements are off.  My counts keep adding to the last symbols count and each symbol is being placed dead center in the drawing.  They should be moving 300 to the right until 5000 is reached then move up 300 and so on.  

    def DoIt(h5):
    	global ocnt, vcnt, mcnt,reset
    	ocnt = 0
    	vcnt = 0
    	mcnt = 0
    	reset = 0
    	xP = 0
    	yP = 0	
    	if h5 != []:
    		if vs.GetTypeN(h5) == 16:
    			GetHandles(h5)
    			reset = 0
    			for h4 in hVP:
    				count(h4)
    			reset = 0
    			vs.SetRecord(h5,'Obj Count')
    			vs.SetRField(h5,'Obj Count','Obj Count',vs.Num2Str(0,ocnt))
    			vs.SetRField(h5,'Obj Count','Vertex Count',vs.Num2Str(0,vcnt))
    			vs.SetRField(h5,'Obj Count','Mesh Count',vs.Num2Str(0,mcnt))
    			vs.Symbol(vs.GetSDName(h5),xP,yP,0)
    			xP = xP + 300
    			if xP > 5000:
    				xP = 0
    				yP += 300
    				
    def count(h4):
    	global ocnt, vcnt, mcnt,reset
    	if reset != 1:
    		ocnt = 0
    		vcnt = 0
    		mcct = 0
    	ocnt = ocnt + 1
    	if vs.GetTypeN(h4) == 5:
    		vcnt = vcnt + vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 21:
    		vcnt = vcnt + vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 40:
    		mcnt = mcnt+ 1
    	reset = 1
    
    def GetHandles2(h1):	
    	while h1 != []:
    		hSEL.append(h1)
    		if vs.GetTypeN(h1) == 92:
    			h2 = vs.FInGroup(h1)
    			while h2 != []:
    				hSEL.append(h2)
    				h2 = vs.NextObj(h2)
    		h1 = vs.NextObj(h1)
    
    def GetHandles(h5):	
    	h2=vs.FInSymDef(h5)
    	while h2 != []:
    		hVP.append(h2)
    		itParent = vs.GetTypeN(h2)  # Get Parent type
    		if itParent == 11:
    			h3 = vs.FInGroup(h2)
    			while h3 != []:
    				hVP.append(h3)
    				h3 = vs.NextObj(h3)
    		h2 = vs.NextObj(h2)
    
    if vs.GetObject('Obj Count') == []:
    	vs.NewField('Obj Count', 'Obj Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Vertex Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Mesh Count', '0', 4, 0)
    
    hVP = []
    hSEL = []
    GetHandles2(vs.FSymDef())
    for h5 in hSEL:
    	if vs.GetTypeN(h5) == 16:
    		DoIt(h5)

     


  7. global ocnt, vcnt, mcnt
    ocnt = 0
    vcnt = 0
    mcnt = 0
    
    def count(h4):
    	ocnt += 1
    	if vs.GetTypeN(h4) == 5:
    		vcnt += vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 21:
    		vcnt += vs.GetVertNum(h4)
    	if vs.GetTypeN(h4) == 40:
    		mcnt += 1
    
    def GetHandles2(h1):	
    	while h1 != []:
    		hSEL.append(h1)
    		if vs.GetTypeN(h1) == 92:
    			h2 = vs.FInGroup(h1)
    			while h2 != []:
    				hSEL.append(h2)
    				h2 = vs.NextObj(h2)
    		h1 = vs.NextObj(h1)
    
    def GetHandles(h5):	
    	h2=vs.FInSymDef(h5)
    	while h2 != []:
    		hVP.append(h2)
    		itParent = vs.GetTypeN(h2)  # Get Parent type
    		if itParent == 11:
    			h3 = vs.FInGroup(h2)
    			while h3 != []:
    				hVP.append(h3)
    				h3 = vs.NextObj(h3)
    		h2 = vs.NextObj(h2)
    
    def DoIt(h5):
    	ocnt = 0
    	vcnt = 0
    	mcnt = 0	
    	if h5 != []:
    		if vs.GetTypeN(h5) == 16:
    			GetHandles(h5)
    			for h4 in hVP:
    				count(h4)
    			vs.SetRecord(h5,'Obj Count')
    			vs.SetRField(h5,'Obj Count','Obj Count',vs.Num2Str(0,ocnt))
    			vs.SetRField(h5,'Obj Count','Vertex Count',vs.Num2Str(0,vcnt))
    			vs.SetRField(h5,'Obj Count','Mesh Count',vs.Num2Str(0,mcnt))
    			vs.symbol(vs.GetSDName(h5),xP,yP,0)
    			xP = xP + 300
    			if xP >= 5000:
    				xP = 0
    				yP = yP + 300
    	xP =0
    	yP =0
    
    if vs.GetObject('Obj Count') == []:
    	vs.NewField('Obj Count', 'Obj Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Vertex Count', '0', 4, 0)
    	vs.NewField('Obj Count', 'Mesh Count', '0', 4, 0)
    
    hVP = []
    hSEL = []
    GetHandles2(vs.FSymDef())
    for h5 in hSEL:
    	if vs.GetTypeN(h5) == 16:
    		DoIt(h5)

    What am I doing wrong?

    keep getting 'ocnt' referenced before assignment error. 


  8. I would like to be able to show dimensions where the dimension label has been overwritten.  This would be dimension that have "Show Dim Value" turned off.  Data visualization does not have a call for dimensions.  I have looked at the script output for a dimension and I don't see how I could query this information either.  If some one knows how please inform me.  If not I would like to add dimensions to the Data Visualization Wishlist. 


  9. Since we a group in an office we have created a workgroup folder to keep our libraries common among all users.   This works great except when it comes to Custom callout libraries.  As you see I have a custom library chosen in by callout dialog named VA_Keynotes.txt. 

    image.thumb.png.82d16150a6a9d3c483b137436f4d4a0d.png

    And the next slide shows what I see when I press the Choose button.  (the typical windows explorer window) This is my personal Notes folder contained within my personal user folder. 

    If I want to choose the database that is in my workgroup folder I have to navigate to the server and down into the workgroup library to choose the database. 

    image.thumb.png.acc7264cd201c955ca02ac6610300cdd.png

       In my opinion this should show me library similar to the one below so that I can quickly choose the database that is the workgroup folder instead of having to navigate to it every time I start a new drawing

    image.thumb.png.b632ba8ba401011e127728cfae0fe8c1.png


  10. On 12/1/2020 at 11:11 PM, michaelk said:

    Is that a screen shot of VW or a PDF?  

     

    The original image I posted was from a PDF and the resolution in the worksheet preferences was set at 600 dpi

    On 12/1/2020 at 11:24 PM, Pat Stanford said:

    In the Worksheet menu, check the preferences and see what you have the Images DPI set to. It appears to be broken. on my machine 72 DPI looks pretty close to what is on the layer while 300 DPI has all of the lines very thin and washed out.

    This one is at 72 dpi.  I agree this must be broken.  I will try to submit it as a bug. 

    image.thumb.png.d3432f08f1b874b255527bbc5b4fd3e7.png

    • Like 1

  11. I requested the feature be added to Vectorworks but I have also created a script, record and data tag workaround.  I have attached the sample vectorworks file.

     

    Only works or roof faces so you have to ungroup your roof to use this. 

    Next you need to run the script included to assign the pitch to a record that is attached to each face.  

    Then you can use the tag to tag the roof faces in plan.  

     

    Note: this is been customized for inch pitches on a 12" run.  The script would have to be modified if you want to use it for a different run dimension. 

     

    image.thumb.png.e3f95ec48c73624edcb94b93090cbf91.png

     

     

    Roof Pitches on Plan.vwx


  12. Ha!  I knew I could drag them up and down but I did not realize pressing the bar at the top would sort them.   Weird thing is that they are still out of order in your example.  Pressing the sort button on the number column does not work but it does work when I press the Description column.  Thank you so much for the insight. 

     

    I did create a worksheet to display and sort my keynotes because I could not get this to work.   I may still end up using the worksheet because I can filter keynotes by sheets and layers rather than going through the process of assigning keynotes to individual keynote lists.  

     

    FYI the hidden value to display the text of a keynote is ='Callout'.'Text'

     

    image.thumb.png.b79d6397222fd2b555646035b66422a2.png

 

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