cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running iLogic based assembly's over internal/external server

Running iLogic based assembly's over internal/external server

Since i use iLogic a lot to drive my assembly's i'm looking for a way to run iLogic in for example a online view for the salesman. Right now I'm very often a middleman have to close my assembly where i'm working on. Update the assembly for the salesman and send it to him over an online view. As you can imagine this is not a very efficient way and the salesman have to call to the office everytime they want a file for a specific assembly.

 

Thats why i'm looking for a way that the salesman of the company can run these specific rules in a online vieuw over a internal or possible an external server.

 

I'm sorry if this already exists but couldn't find it anywhere and would appriciate it if someone already has a solution.

3 Comments
clutsa
Collaborator

One of Autodesk's best kept secrets... What you're looking for is Configurator 360. It does have it's own fees but when you compare that a salesman doesn't have to interrupt you, the cost justifies itself. You write all the iLogic in a normal .ipt or .iam and zip that file with any parts used and load it on Autodesk's server. I use an iLogic form that has all the options as drop downs and tell C360 to use that form as it's options. 

Really slick piece of software. Read up on it and when you think you're ready try the 30 day free trial. 

https://www.autodesk.com/products/configurator-360/overview

Anonymous
Not applicable

I've just looked into it and tried it out but it has to much restrictions for my purposes. One is that it's not able to convert a sharedvariable to a cloud based number during the updating of the assembly. Also not being able to acces (some of) the API wich contains the information of for example the parts used in the assembly restricts the possibility to create endless assembly's and I can't find a way to work around that.

 

I'm sorry that I was that unclear about what I wanted but with the current state of C360 it just isn't possible to create what I want. I've tried to work around it but can't find a way. Here's one of the codes i'd possibly like to use (main assembly).

Dim oDoc As AssemblyDocument
oDoc = ThisApplication.ActiveDocument

Dim oDocDef As AssemblyComponentDefinition
oDocDef = oDoc.ComponentDefinition

Dim oComp As ComponentOccurrence
On Error Resume Next

'Dim excel As String = "C:/test/Map1" 'excelbestand
Dim lengte As Integer = TotalLength
 'waarde totale lengte
Dim tussen As Integer= Standard 'waarde standaard lengte tussendelen
Dim mineindlengte As Integer = Minimum
Dim tussenstukken As Integer = lengte 'totale waarde voor tussendelen
Dim tussenberekening As Double = tussen + mineindlengte
Dim A As Integer = 0 'aantal standaard lengtes
Dim B As Integer = tussenstukken 'voor overige lengte
Dim D As Integer = 1 'aantal geplaatste tussenstukken
Dim C As Integer = D + 1 'te plaatsen nummer
Dim E As String = A 'voor plaatsen flushes met variabelen
Dim G As Integer = 4 'flushnummer
Dim H As Integer = 1

'verwijderen van bijna alle componenten
For Each oComp In oDocDef.Occurrences
Dim Test As String = ("Test2:" & H)
If H = 1 Then 'deleting test2: vanaf 2
	Parameter.Quiet = True
	H = H + 1
Else If H > 1 Then
	Components.Delete(Test)
	H = H + 1
End If

If oComp = "Test3:1" Then 'deleting var. length
	Components.Delete("Test3:1")
End If

Next

'berekenen hoeveel standaard lengtes en welke lengte over moet zijn
Do While B >= tussenberekening
	A = A + 1
	B = B - tussen
Loop
If B = tussen Then
	A = A + 1
	B = B - tussen
End If


SharedVariable("aantal") = A
SharedVariable("standaardlengte") = tussen
SharedVariable("variabelelengte") = B

'plaatsen van standaard lengtes
Do While D < A
	Parameter.Quiet = True
	Test2 = "C:\test\Test2.ipt"
	Components.Add("test2:" & C, Test2, position := Nothing, grounded := False, visible := True, appearance := Nothing)
	Constraints.AddFlush("Flush" & G, "Test2:" & D, "YZ PLANE", "Test2:" & C, "YZ PLANE",
                     offset := tussen, biasPoint1 := Nothing, biasPoint2 := Nothing)
	G = G + 1
	Constraints.AddFlush("Flush" & G, "Test2:" & D, "XZ PLANE", "Test2:" & C, "XZ PLANE",
                     offset := 0.0, biasPoint1 := Nothing, biasPoint2 := Nothing)
	G = G + 1
	Constraints.AddFlush("Flush" & G, "Test2:" & D, "XY PLANE", "Test2:" & C, "XY PLANE",
                     offset := 0.0, biasPoint1 := Nothing, biasPoint2 := Nothing)
	G = G + 1
	D = D + 1
	C = C + 1
Loop

'plaatsen van variabele lengte
Do While B > 0
	Parameter.Quiet = True
	Test3 = "C:\test\Test3.ipt"
	Components.Add("test3:1", Test3, position := Nothing, grounded := False, visible := True, appearance := Nothing)
	Constraints.AddFlush("Flush" & G, "Test2:" & D, "YZ PLANE", "Test3:1", "YZ PLANE",
                     offset := tussen, biasPoint1 := Nothing, biasPoint2 := Nothing)
	G = G + 1
	Constraints.AddFlush("Flush" & G, "Test2:" & D, "XZ PLANE", "Test3:1", "XZ PLANE",
                     offset := 0.0, biasPoint1 := Nothing, biasPoint2 := Nothing)
	G = G + 1
	Constraints.AddFlush("Flush" & G, "Test2:" & D, "XY PLANE", "Test3:1", "XY PLANE",
                     offset := 0.0, biasPoint1 := Nothing, biasPoint2 := Nothing)
	B = B - B
Loop

'standard rules for making replace component possible
fmgr = ThisApplication.FileManager 
For Each File In fmgr.Files
doc = ThisApplication.Documents.ItemByName (File.fullfileName)
compdef = doc.ComponentDefinition

If (doc.documenttype = 12291) Then ' only do this for assembly or subassembly
 For Each occ In compdef.Occurrences
    If (occ.definition.type = 83886592) Then ' only do this for part 
	'sets the parameter command possible
	Parameter.Quiet = True
		If Parameter(occ.Name, "length") And Parameter(occ.Name, "length") And Parameter(occ.Name, "length") Then 
			'IMPORTANT TO FILL THE NAME AND ROW
			Parameter(occ.Name, "length") = length
			'access the ilogic rules in the parts
			iLogicVb.RunRule(occ.Name, "update parameters")
      		iLogicVb.RunRule(occ.Name, "Part number")
			'replace the old component with the new component
     		Component.Replace(occ.Name, iProperties.Value(occ.Name, "Project", "Part Number") & ".ipt", False)
			'sets iproterties.value naar occ.Name
      		occ.Name =  iProperties.Value(occ.Name,"Project", "Part Number")
	  	End If 
    End If
 Next occ
End If
Next File

'Calling rules in subassembly's

auto = iLogicVb.Automation

' Set Rule Name
Dim ruleName As String
ruleName = "update length"

' Get the active assembly.
Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument

' Get all of the referenced docments.
Dim oRefDocs As DocumentsEnumerator
oRefDocs = oAsmDoc.AllReferencedDocuments

' Iterate through the list of documents
Dim oRefDoc As Document

For Each oRefDoc In oRefDocs
	Dim rule As Object
	rule = auto.GetRule(oRefDoc, ruleName)
	If (rule Is Nothing) Then
	Else
		
	Dim i As Integer
	i = auto.RunRuleDirect(rule)
	End If

Next

iLogicVb.DocumentUpdate

SharedVariable.RemoveAll()

clutsa
Collaborator

I'm not sure I understand what you mean with "not able to convert a sharedvariable to a cloud based number during the updating of the assembly". Are you trying to output the sharedvariable to another software? 

 

I'm not totally familiar with components.add (because I'm still rocking Inv2018) but doesn't calling "ThisAssembly.BeginManage()" and "ThisAssembly.EndManage()" take care of some of what you're doing?

You could also look at "excluding" parts so you don't have to delete them and that would simplify your file paths. 

 

If you still have the free trial of C360 you also have to change "ThisApplication" to "ThisServer".

 

At any rate if it doesn't work for you it doesn't work... I just didn't see anything in your code that looked impossible to work around.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea